PIKApp/app/core/pikaparasitelist.h

70 lines
2.9 KiB
C
Raw Normal View History

2023-09-26 00:35:21 +02:00
/* parasitelist.h: Copyright 1998 Jay Cox <jaycox@gimp.org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_PARASITE_LIST_H__
#define __PIKA_PARASITE_LIST_H__
#include "pikaobject.h"
#define PIKA_TYPE_PARASITE_LIST (pika_parasite_list_get_type ())
#define PIKA_PARASITE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_PARASITE_LIST, PikaParasiteList))
#define PIKA_PARASITE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_PARASITE_LIST, PikaParasiteListClass))
#define PIKA_IS_PARASITE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_PARASITE_LIST))
#define PIKA_IS_PARASITE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_PARASITE_LIST))
#define PIKA_PARASITE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_PARASITE_LIST, PikaParasiteListClass))
typedef struct _PikaParasiteListClass PikaParasiteListClass;
struct _PikaParasiteList
{
PikaObject object;
GHashTable *table;
};
struct _PikaParasiteListClass
{
PikaObjectClass parent_class;
void (* add) (PikaParasiteList *list,
PikaParasite *parasite);
void (* remove) (PikaParasiteList *list,
PikaParasite *parasite);
};
GType pika_parasite_list_get_type (void) G_GNUC_CONST;
PikaParasiteList * pika_parasite_list_new (void);
PikaParasiteList * pika_parasite_list_copy (PikaParasiteList *list);
void pika_parasite_list_add (PikaParasiteList *list,
const PikaParasite *parasite);
void pika_parasite_list_remove (PikaParasiteList *list,
const gchar *name);
gint pika_parasite_list_length (PikaParasiteList *list);
gint pika_parasite_list_persistent_length (PikaParasiteList *list);
void pika_parasite_list_foreach (PikaParasiteList *list,
GHFunc function,
gpointer user_data);
const PikaParasite * pika_parasite_list_find (PikaParasiteList *list,
const gchar *name);
#endif /* __PIKA_PARASITE_LIST_H__ */