| 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- |
| 2 | * GObject introspection: Flags type |
| 3 | * |
| 4 | * Copyright 2024 GNOME Foundation, Inc. |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-or-later |
| 7 | * |
| 8 | * This library is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU Lesser General Public |
| 10 | * License as published by the Free Software Foundation; either |
| 11 | * version 2 of the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This library is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * Lesser General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Lesser General Public |
| 19 | * License along with this library; if not, write to the |
| 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 21 | * Boston, MA 02111-1307, USA. |
| 22 | */ |
| 23 | |
| 24 | #pragma once |
| 25 | |
| 26 | #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION) |
| 27 | #error "Only <girepository.h> can be included directly." |
| 28 | #endif |
| 29 | |
| 30 | #include <girepository/gitypes.h> |
| 31 | |
| 32 | G_BEGIN_DECLS |
| 33 | |
| 34 | #define GI_TYPE_FLAGS_INFO (gi_flags_info_get_type ()) |
| 35 | |
| 36 | /** |
| 37 | * GI_FLAGS_INFO: |
| 38 | * @info: Info object which is subject to casting. |
| 39 | * |
| 40 | * Casts a [[email protected]] or derived pointer into a |
| 41 | * `(GIFlagsInfo*)` pointer. |
| 42 | * |
| 43 | * Depending on the current debugging level, this function may invoke |
| 44 | * certain runtime checks to identify invalid casts. |
| 45 | * |
| 46 | * Since: 2.80 |
| 47 | */ |
| 48 | #define GI_FLAGS_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_FLAGS_INFO, GIFlagsInfo)) |
| 49 | |
| 50 | /** |
| 51 | * GI_IS_FLAGS_INFO: |
| 52 | * @info: an info structure |
| 53 | * |
| 54 | * Checks if @info is a [[email protected]] (or a derived type). |
| 55 | * |
| 56 | * Since: 2.80 |
| 57 | */ |
| 58 | #define GI_IS_FLAGS_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_FLAGS_INFO)) |
| 59 | |
| 60 | G_END_DECLS |