~ubuntu-branches/ubuntu/karmic/mergeant/karmic

« back to all changes in this revision

Viewing changes to libmergeant/mg-data-entry.h

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo R. Montesino
  • Date: 2007-11-29 08:44:48 UTC
  • mfrom: (2.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20071129084448-6aon73d22bv6hzfw
Tags: 0.67-3
* Re-enable installation of the mime files in mergeant.install
* mergeant.dirs: create usr/share/mime/packages to make dh_installmime add
  the update-mime-database code snippets

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* mg-data-entry.h
2
 
 *
3
 
 * Copyright (C) 2003 Vivien Malerba
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU General Public License as
7
 
 * published by the Free Software Foundation; either version 2 of the
8
 
 * License, or (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18
 
 * USA
19
 
 */
20
 
 
21
 
 
22
 
#ifndef __MG_DATA_ENTRY_H_
23
 
#define __MG_DATA_ENTRY_H_
24
 
 
25
 
#include <glib-object.h>
26
 
#include "mg-defs.h"
27
 
#include <libgda/libgda.h>
28
 
#include <gtk/gtk.h>
29
 
 
30
 
G_BEGIN_DECLS
31
 
 
32
 
#define MG_DATA_ENTRY_TYPE          (mg_data_entry_get_type())
33
 
#define MG_DATA_ENTRY(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, mg_data_entry_get_type(), MgDataEntry)
34
 
#define IS_MG_DATA_ENTRY(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_data_entry_get_type ())
35
 
#define MG_DATA_ENTRY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MG_DATA_ENTRY_TYPE, MgDataEntryIface))
36
 
 
37
 
typedef enum {
38
 
        MG_DATA_ENTRY_IS_NULL        = 1 << 0, /* READ | WRITE */
39
 
        MG_DATA_ENTRY_CAN_BE_NULL    = 1 << 1, /* READ | WRITE */
40
 
        MG_DATA_ENTRY_IS_DEFAULT     = 1 << 2, /* READ | WRITE */
41
 
        MG_DATA_ENTRY_CAN_BE_DEFAULT = 1 << 3, /* READ | WRITE */
42
 
        MG_DATA_ENTRY_IS_UNCHANGED   = 1 << 4, /* READ | WRITE */
43
 
        MG_DATA_ENTRY_ACTIONS_SHOWN  = 1 << 5, /* READ | WRITE */
44
 
        MG_DATA_ENTRY_DATA_NON_VALID = 1 << 6, /* READ */
45
 
        MG_DATA_ENTRY_HAS_VALUE_ORIG = 1 << 7  /* READ */
46
 
} MgDataEntryAttribute;
47
 
 
48
 
/* struct for the interface */
49
 
struct _MgDataEntryIface
50
 
{
51
 
        GTypeInterface           g_iface;
52
 
 
53
 
        /* signals */
54
 
        void            (* contents_modified)     (MgDataEntry *de);
55
 
        void            (* status_changed)        (MgDataEntry *de);
56
 
 
57
 
        /* virtual table */
58
 
        void            ( *set_value_type)        (MgDataEntry *de, GdaValueType type);
59
 
        GdaValueType    ( *get_value_type)        (MgDataEntry *de);
60
 
        void            ( *set_value)             (MgDataEntry *de, const GdaValue * value);
61
 
        GdaValue       *( *get_value)             (MgDataEntry *de);
62
 
        void            ( *set_value_orig)        (MgDataEntry *de, const GdaValue * value);
63
 
        const GdaValue *( *get_value_orig)        (MgDataEntry *de);
64
 
        void            ( *set_value_default)     (MgDataEntry *de, const GdaValue * value);
65
 
        void            ( *set_attributes)        (MgDataEntry *de, guint attrs, guint mask);
66
 
        guint           ( *get_attributes)        (MgDataEntry *de);
67
 
        MgDataHandler  *( *get_handler)           (MgDataEntry *de);
68
 
        gboolean        ( *expand_in_layout)      (MgDataEntry *de);
69
 
};
70
 
 
71
 
 
72
 
 
73
 
 
74
 
guint           mg_data_entry_get_type               (void);
75
 
 
76
 
void            mg_data_entry_set_value_type         (MgDataEntry *de, GdaValueType type);
77
 
GdaValueType    mg_data_entry_get_value_type         (MgDataEntry *de);
78
 
 
79
 
void            mg_data_entry_set_value              (MgDataEntry *de, const GdaValue * value);
80
 
GdaValue       *mg_data_entry_get_value              (MgDataEntry *de);
81
 
void            mg_data_entry_set_value_orig         (MgDataEntry *de, const GdaValue * value);
82
 
const GdaValue *mg_data_entry_get_value_orig         (MgDataEntry *de);
83
 
void            mg_data_entry_set_current_as_orig    (MgDataEntry *de);
84
 
void            mg_data_entry_set_value_default      (MgDataEntry *de, const GdaValue * value);
85
 
 
86
 
void            mg_data_entry_set_attributes         (MgDataEntry *de, guint attrs, guint mask);
87
 
guint           mg_data_entry_get_attributes         (MgDataEntry *de);
88
 
 
89
 
MgDataHandler  *mg_data_entry_get_handler            (MgDataEntry *de);
90
 
gboolean        mg_data_entry_expand_in_layout       (MgDataEntry *de);
91
 
 
92
 
G_END_DECLS
93
 
 
94
 
#endif