File: prop_basic.h

package info (click to toggle)
dia 0.94.0-7sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 27,804 kB
  • ctags: 11,124
  • sloc: ansic: 110,979; sh: 8,442; xml: 2,988; makefile: 2,431; python: 1,789; cpp: 1,652
file content (106 lines) | stat: -rw-r--r-- 4,949 bytes parent folder | download | duplicates (6)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* Dia -- a diagram creation/manipulation program -*- c -*-
 * Copyright (C) 1998 Alexander Larsson
 *
 * Property system for dia objects/shapes.
 * Copyright (C) 2000 James Henstridge
 * Copyright (C) 2001 Cyrille Chepelov
 * Major restructuration done in August 2001 by C. Chepelov
 *
 * Basic Property types definition. 
 *
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef PROP_BASIC_H
#define PROP_BASIC_H

#include "properties.h"
#include "dia_xml.h"

void initialize_property(Property *prop, const PropDescription *pdesc,
                         PropDescToPropPredicate reason);
void copy_init_property(Property *dest, const Property *src);

typedef struct {
  Property common;
} NoopProperty;

NoopProperty *noopprop_new(const PropDescription *pdesc, 
                           PropDescToPropPredicate reason);
void noopprop_free(NoopProperty *prop);
NoopProperty *noopprop_copy(NoopProperty *src);
WIDGET *noopprop_get_widget(NoopProperty *prop, PropDialog *dialog);
void noopprop_reset_widget(NoopProperty *prop, WIDGET *widget);
void noopprop_set_from_widget(NoopProperty *prop, WIDGET *widget);
void noopprop_load(NoopProperty *prop, AttributeNode attr, DataNode data);
void noopprop_save(NoopProperty *prop, AttributeNode attr);
gboolean noopprop_can_merge(const PropDescription *pd1, 
                            const PropDescription *pd2);
gboolean noopprop_cannot_merge(const PropDescription *pd1, 
                               const PropDescription *pd2);
void noopprop_get_from_offset(const NoopProperty *prop,
                              void *base, guint offset, guint offset2);
void noopprop_set_from_offset(NoopProperty *prop,
                              void *base, guint offset, guint offset2);

typedef struct {
  Property common;
} InvalidProperty;

InvalidProperty *invalidprop_new(const PropDescription *pdesc, 
                                 PropDescToPropPredicate reason);
void invalidprop_free(InvalidProperty *prop);
InvalidProperty *invalidprop_copy(InvalidProperty *src);
WIDGET *invalidprop_get_widget(InvalidProperty *prop, PropDialog *dialog);
void invalidprop_reset_widget(InvalidProperty *prop, WIDGET *widget);
void invalidprop_set_from_widget(InvalidProperty *prop, WIDGET *widget);
void invalidprop_load(InvalidProperty *prop, AttributeNode attr, 
                      DataNode data);
void invalidprop_save(InvalidProperty *prop, AttributeNode attr);
gboolean invalidprop_can_merge(const PropDescription *pd1, 
                               const PropDescription *pd2);
void invalidprop_get_from_offset(const InvalidProperty *prop,
                                 void *base, guint offset, guint offset2);
void invalidprop_set_from_offset(InvalidProperty *prop,
                                 void *base, guint offset, guint offset2);
typedef struct {
  Property common;
} UnimplementedProperty;

UnimplementedProperty *unimplementedprop_new(const PropDescription *pdesc, 
                                             PropDescToPropPredicate reason);
void unimplementedprop_free(UnimplementedProperty *prop);
UnimplementedProperty *unimplementedprop_copy(UnimplementedProperty *src);
WIDGET *unimplementedprop_get_widget(UnimplementedProperty *prop, 
                                     PropDialog *dialog);
void unimplementedprop_reset_widget(UnimplementedProperty *prop, 
                                    WIDGET *widget); 
void unimplementedprop_set_from_widget(UnimplementedProperty *prop, 
                                       WIDGET *widget);
void unimplementedprop_load(UnimplementedProperty *prop, 
                            AttributeNode attr, DataNode data); 
void unimplementedprop_save(UnimplementedProperty *prop, AttributeNode attr);
gboolean unimplementedprop_can_merge(const PropDescription *pd1, 
                                     const PropDescription *pd2);
void unimplementedprop_get_from_offset(const UnimplementedProperty *prop,
                                       void *base, 
                                       guint offset, guint offset2); 

void unimplementedprop_set_from_offset(UnimplementedProperty *prop,
                                       void *base, 
                                       guint offset, guint offset2);
void prop_basic_register(void);

#endif