~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/dialogs/rdf.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 *
3
 
 * \brief headers for RDF types
4
 
 * 
5
 
 * Authors:
6
 
 *  Kees Cook <kees@outflux.net>
7
 
 *
8
 
 * Copyright (C) 2004 Kees Cook <kees@outflux.net>
9
 
 * 
10
 
 * Released under GNU GPL, read the file 'COPYING' for more information
11
 
 * 
12
 
 */
13
 
#ifndef _RDF_H_
14
 
#define _RDF_H_
15
 
 
16
 
#include <glib.h>
17
 
 
18
 
#include <glibmm/i18n.h>
19
 
#include "document.h"
20
 
 
21
 
// yeah, it's not a triple yet...
22
 
/**
23
 
 * \brief Holds license name/resource doubles for rdf_license_t entries
24
 
 */
25
 
struct rdf_double_t {
26
 
    gchar const *name;
27
 
    gchar const *resource;
28
 
};
29
 
 
30
 
/**
31
 
 * \brief Holds license name and RDF information
32
 
 */
33
 
struct rdf_license_t {
34
 
    gchar const *name;        /* localized name of this license */
35
 
    gchar const *uri;         /* URL for the RDF/Work/license element */
36
 
    struct rdf_double_t *details; /* the license details */
37
 
//    gchar const *fragment;    /* XML contents for the RDF/License tag */
38
 
};
39
 
 
40
 
extern rdf_license_t rdf_licenses [];
41
 
 
42
 
/**
43
 
 * \brief Describes how a given RDF entity is stored in XML
44
 
 */
45
 
enum RDFType {
46
 
    RDF_CONTENT,  // direct between-XML-tags content
47
 
    RDF_AGENT,    // requires the "Agent" hierarchy before doing content
48
 
    RDF_RESOURCE, // stored in "rdf:resource" element
49
 
    RDF_XML,      // literal XML
50
 
    RDF_BAG       // rdf:Bag resources
51
 
};
52
 
 
53
 
/**
54
 
 * \brief Describes how a given RDF entity should be edited
55
 
 */
56
 
enum RDF_Format {
57
 
    RDF_FORMAT_LINE,          // uses single line data (GtkEntry)
58
 
    RDF_FORMAT_MULTILINE,     // uses multiline data (GtkTextView)
59
 
    RDF_FORMAT_SPECIAL        // uses some other edit methods
60
 
};
61
 
 
62
 
enum RDF_Editable {
63
 
    RDF_EDIT_GENERIC,       // editable via generic widgets
64
 
    RDF_EDIT_SPECIAL,       // special widgets are needed
65
 
    RDF_EDIT_HARDCODED      // isn't editable
66
 
};
67
 
 
68
 
/**
69
 
 * \brief Holds known RDF/Work tags
70
 
 */
71
 
struct rdf_work_entity_t {
72
 
    char const *name;       /* unique name of this entity for internal reference */
73
 
    gchar const *title;      /* localized title of this entity for data entry */
74
 
    gchar const *tag;        /* namespace tag for the RDF/Work element */
75
 
    RDFType datatype;   /* how to extract/inject the RDF information */
76
 
    gchar const *tip;        /* tool tip to explain the meaning of the entity */
77
 
    RDF_Format format;  /* in what format is this data edited? */
78
 
    RDF_Editable editable;/* in what way is the data editable? */
79
 
};
80
 
 
81
 
extern rdf_work_entity_t rdf_work_entities [];
82
 
 
83
 
/**
84
 
 * \brief Generic collection of RDF information for the RDF debug function
85
 
 */
86
 
struct rdf_t {
87
 
    gchar*                work_title;
88
 
    gchar*                work_date;
89
 
    gchar*                work_creator;
90
 
    gchar*                work_owner;
91
 
    gchar*                work_publisher;
92
 
    gchar*                work_type;
93
 
    gchar*                work_source;
94
 
    gchar*                work_subject;
95
 
    gchar*                work_description;
96
 
    struct rdf_license_t* license;
97
 
};
98
 
 
99
 
struct rdf_work_entity_t * rdf_find_entity(gchar const * name);
100
 
 
101
 
const gchar * rdf_get_work_entity(SPDocument * doc,
102
 
                                  struct rdf_work_entity_t * entity);
103
 
unsigned int  rdf_set_work_entity(SPDocument * doc,
104
 
                                  struct rdf_work_entity_t * entity,
105
 
                                  const gchar * text);
106
 
 
107
 
struct rdf_license_t * rdf_get_license(SPDocument * doc);
108
 
void                   rdf_set_license(SPDocument * doc,
109
 
                                       struct rdf_license_t const * license);
110
 
 
111
 
void rdf_set_defaults ( SPDocument * doc );
112
 
 
113
 
#endif // _RDF_H_
114
 
 
115
 
/*
116
 
  Local Variables:
117
 
  mode:c++
118
 
  c-file-style:"stroustrup"
119
 
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
120
 
  indent-tabs-mode:nil
121
 
  fill-column:99
122
 
  End:
123
 
*/
124
 
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :