birb/birbstringobject.h

Tue, 28 Jan 2025 10:49:21 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 28 Jan 2025 10:49:21 -0600
changeset 40
b2c2ca3e8e72
parent 30
48d5c1a74840
permissions
-rw-r--r--

Add a license file

Adding the license property to meson required bumping to version 1.1.0.

Testing Done:
Ran `meson dist`

Bugs closed: BIRB-9

Reviewed at https://reviews.imfreedom.org/r/3786/

/*
 * Copyright (C) 2023-2025 Birb Developers
 *
 * Birb is the legal property of its developers, whose names are too
 * numerous to list here. Please refer to the AUTHORS file distributed
 * with this source distribution
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <https://www.gnu.org/licenses/>.
 */

#if !defined(BIRB_GLOBAL_HEADER_INSIDE) && !defined(BIRB_COMPILATION)
# error "only <birb.h> may be included directly"
#endif

#ifndef BIRB_STRING_OBJECT_H
#define BIRB_STRING_OBJECT_H

#include <glib.h>
#include <glib-object.h>

#include "birbversion.h"

G_BEGIN_DECLS

#define BIRB_TYPE_STRING_OBJECT (birb_string_object_get_type())

/**
 * BirbStringObject:
 *
 * A BirbStringObject is a simple [class@GObject.Object] that holds a string.
 *
 * It was created to hold strings in a [iface@Gio.ListModel].
 *
 * Since: 0.3
 */
BIRB_AVAILABLE_IN_0_3
G_DECLARE_FINAL_TYPE(BirbStringObject, birb_string_object, BIRB, STRING_OBJECT,
                     GObject)

/**
 * birb_string_object_get_string:
 *
 * Gets the string.
 *
 * Returns: The string.
 *
 * Since: 0.3
 */
BIRB_AVAILABLE_IN_0_3
const char *birb_string_object_get_string(BirbStringObject *obj);

/**
 * birb_string_object_new:
 * @str: (transfer none) (nullable): the string
 *
 * Creates a new action menu.
 *
 * Returns: (transfer full): The new instance.
 *
 * Since: 0.3
 */
BIRB_AVAILABLE_IN_0_3
BirbStringObject *birb_string_object_new(const char *str);

/**
 * birb_string_object_set_string:
 * @str: (transfer none) (nullable): the new string
 *
 * Sets the string that the object contains.
 *
 * Since: 0.3
 */
BIRB_AVAILABLE_IN_0_3
void birb_string_object_set_string(BirbStringObject *obj, const char *str);

G_END_DECLS

#endif /* BIRB_STRING_OBJECT_H */

mercurial