Commit 62321519 authored by Danilo Galete's avatar Danilo Galete 💬
Browse files

Create: graphic data object interface

parent a5e22bb9
/* finance-graphic-data-object.c
*
* Copyright 2021 galetedanilo <galetedanilo@gmail.com>
*
* 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 3 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 <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include "finance-graphic-data-object.h"
G_DEFINE_INTERFACE (FinanceGraphicDataObject, finance_graphic_data_object, G_TYPE_OBJECT)
static void
finance_graphic_data_object_default_init (FinanceGraphicDataObjectInterface *iface)
{
(void)iface;
}
void
finance_graphic_data_object_has_changed (FinanceGraphicDataObject *object)
{
g_return_if_fail (FINANCE_IS_GRAPHIC_DATA_OBJECT (object));
g_return_if_fail (FINANCE_GRAPHIC_DATA_OBJECT_GET_IFACE (object)->has_changed);
FINANCE_GRAPHIC_DATA_OBJECT_GET_IFAC (object)->has_changed (object);
}
/* finance-graphic-data-object.h
*
* Copyright 2021 galetedanilo <galetedanilo@gmail.com>
*
* 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 3 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 <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef __FINANCE_GRAPHIC_DATA_OBJECT_H__
#define __FINANCE_GRAPHIC_DATA_OBJECT_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define FINANCE_TYPE_GRAPHIC_DATA_OBJECT (finance_graphic_data_object_get_type ())
G_DECLARE_INTERFACE (FinanceGraphicDataObject, finance_graphic_data_object, FINANCE, GRAPHIC_DATA_OBJECT, GObject)
struct _FinanceGraphicDataObjectInterface
{
GTypeInterface parent;
gboolean (*has_changed) (FinanceGraphicDataObject *object);
};
void finance_graphic_data_object_has_changed (FinanceGraphicDataObject *object);
G_END_DECLS
#endif /* __FINANCE_GRAPHIC_DATA_OBJECT_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment