1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2002 CodeFactory AB
* Copyright (C) 2002 Richard Hult <richard@imendio.com>
* Copyright (C) 2002 Mikael Hallendal <micke@imendio.com>
*
* This library 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 library 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 library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __MRP_PROPERTY_H__
#define __MRP_PROPERTY_H__
#include <glib.h>
#include <glib-object.h>
#define MRP_PROPERTY(x) ((MrpProperty *) x)
#define MRP_TYPE_PROPERTY (mrp_property_get_type ())
typedef GParamSpec MrpProperty;
typedef enum {
MRP_PROPERTY_TYPE_NONE,
MRP_PROPERTY_TYPE_INT,
MRP_PROPERTY_TYPE_FLOAT,
MRP_PROPERTY_TYPE_STRING,
MRP_PROPERTY_TYPE_STRING_LIST,
MRP_PROPERTY_TYPE_DATE,
MRP_PROPERTY_TYPE_DURATION,
MRP_PROPERTY_TYPE_COST
} MrpPropertyType;
GType mrp_property_get_type (void) G_GNUC_CONST;
MrpProperty * mrp_property_new (const gchar *name,
MrpPropertyType type,
const gchar *label,
const gchar *description,
gboolean user_defined);
const gchar * mrp_property_get_name (MrpProperty *property);
MrpPropertyType mrp_property_get_property_type (MrpProperty *property);
void mrp_property_set_label (MrpProperty *property,
const gchar *label);
const gchar * mrp_property_get_label (MrpProperty *property);
void mrp_property_set_description (MrpProperty *property,
const gchar *description);
const gchar * mrp_property_get_description (MrpProperty *property);
void mrp_property_set_user_defined (MrpProperty *property,
gboolean user_defined);
gboolean mrp_property_get_user_defined (MrpProperty *property);
MrpProperty * mrp_property_ref (MrpProperty *property);
void mrp_property_unref (MrpProperty *property);
const gchar * mrp_property_type_as_string (MrpPropertyType type);
#endif /* __MRP_PROPERTY_H__ */
|