giinterfaceinfo.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
  2. * GObject introspection: Interface
  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. #pragma once
  25. #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
  26. #error "Only <girepository.h> can be included directly."
  27. #endif
  28. #include <girepository/gitypes.h>
  29. G_BEGIN_DECLS
  30. #define GI_TYPE_INTERFACE_INFO (gi_interface_info_get_type ())
  31. /**
  32. * GI_INTERFACE_INFO:
  33. * @info: Info object which is subject to casting.
  34. *
  35. * Casts a [type@GIRepository.InterfaceInfo] or derived pointer into a
  36. * `(GIInterfaceInfo*)` pointer.
  37. *
  38. * Depending on the current debugging level, this function may invoke
  39. * certain runtime checks to identify invalid casts.
  40. *
  41. * Since: 2.80
  42. */
  43. #define GI_INTERFACE_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_INTERFACE_INFO, GIInterfaceInfo))
  44. /**
  45. * GI_IS_INTERFACE_INFO:
  46. * @info: an info structure
  47. *
  48. * Checks if @info is a [class@GIRepository.InterfaceInfo] (or a derived type).
  49. *
  50. * Since: 2.80
  51. */
  52. #define GI_IS_INTERFACE_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_INTERFACE_INFO))
  53. GI_AVAILABLE_IN_ALL
  54. unsigned int gi_interface_info_get_n_prerequisites (GIInterfaceInfo *info);
  55. GI_AVAILABLE_IN_ALL
  56. GIBaseInfo * gi_interface_info_get_prerequisite (GIInterfaceInfo *info,
  57. unsigned int n);
  58. GI_AVAILABLE_IN_ALL
  59. unsigned int gi_interface_info_get_n_properties (GIInterfaceInfo *info);
  60. GI_AVAILABLE_IN_ALL
  61. GIPropertyInfo * gi_interface_info_get_property (GIInterfaceInfo *info,
  62. unsigned int n);
  63. GI_AVAILABLE_IN_ALL
  64. unsigned int gi_interface_info_get_n_methods (GIInterfaceInfo *info);
  65. GI_AVAILABLE_IN_ALL
  66. GIFunctionInfo * gi_interface_info_get_method (GIInterfaceInfo *info,
  67. unsigned int n);
  68. GI_AVAILABLE_IN_ALL
  69. GIFunctionInfo * gi_interface_info_find_method (GIInterfaceInfo *info,
  70. const char *name);
  71. GI_AVAILABLE_IN_ALL
  72. unsigned int gi_interface_info_get_n_signals (GIInterfaceInfo *info);
  73. GI_AVAILABLE_IN_ALL
  74. GISignalInfo * gi_interface_info_get_signal (GIInterfaceInfo *info,
  75. unsigned int n);
  76. GI_AVAILABLE_IN_ALL
  77. GISignalInfo * gi_interface_info_find_signal (GIInterfaceInfo *info,
  78. const char *name);
  79. GI_AVAILABLE_IN_ALL
  80. unsigned int gi_interface_info_get_n_vfuncs (GIInterfaceInfo *info);
  81. GI_AVAILABLE_IN_ALL
  82. GIVFuncInfo * gi_interface_info_get_vfunc (GIInterfaceInfo *info,
  83. unsigned int n);
  84. GI_AVAILABLE_IN_ALL
  85. GIVFuncInfo * gi_interface_info_find_vfunc (GIInterfaceInfo *info,
  86. const char *name);
  87. GI_AVAILABLE_IN_ALL
  88. unsigned int gi_interface_info_get_n_constants (GIInterfaceInfo *info);
  89. GI_AVAILABLE_IN_ALL
  90. GIConstantInfo * gi_interface_info_get_constant (GIInterfaceInfo *info,
  91. unsigned int n);
  92. GI_AVAILABLE_IN_ALL
  93. GIStructInfo * gi_interface_info_get_iface_struct (GIInterfaceInfo *info);
  94. G_END_DECLS