Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
rdf.h File Reference

headers for RDF types More...

Go to the source code of this file.

Classes

struct  rdf_double_t
 Holds license name/resource doubles for rdf_license_t entries. More...
 
struct  rdf_license_t
 Holds license name and RDF information. More...
 
struct  rdf_work_entity_t
 Holds known RDF/Work tags. More...
 
struct  rdf_t
 Generic collection of RDF information for the RDF debug function. More...
 

Enumerations

enum  RDFType {
  RDF_CONTENT , RDF_AGENT , RDF_RESOURCE , RDF_XML ,
  RDF_BAG
}
 Describes how a given RDF entity is stored in XML. More...
 
enum  RDF_Format { RDF_FORMAT_LINE , RDF_FORMAT_MULTILINE , RDF_FORMAT_SPECIAL }
 Describes how a given RDF entity should be edited. More...
 
enum  RDF_Editable { RDF_EDIT_GENERIC , RDF_EDIT_SPECIAL , RDF_EDIT_HARDCODED }
 

Functions

struct rdf_work_entity_trdf_find_entity (char const *name)
 
const gchar * rdf_get_work_entity (SPDocument const *doc, struct rdf_work_entity_t *entity)
 Retrieves a known RDF/Work entity's contents from the document XML by name.
 
unsigned int rdf_set_work_entity (SPDocument *doc, struct rdf_work_entity_t *entity, const char *text)
 Stores a string into a named RDF/Work entity in the document XML.
 
struct rdf_license_trdf_get_license (SPDocument *doc, bool read_only)
 Attempts to match and retrieve a known RDF/License from the document XML.
 
void rdf_set_license (SPDocument *doc, struct rdf_license_t const *license)
 Stores an RDF/License XML in the document XML.
 
void rdf_set_defaults (SPDocument *doc)
 
void rdf_add_from_preferences (SPDocument *doc)
 

Variables

constexpr auto PREFS_METADATA = "/metadata/rdf/"
 
rdf_license_t rdf_licenses []
 
rdf_work_entity_t rdf_work_entities []
 

Detailed Description

headers for RDF types

Definition in file rdf.h.

Enumeration Type Documentation

◆ RDF_Editable

Enumerator
RDF_EDIT_GENERIC 
RDF_EDIT_SPECIAL 
RDF_EDIT_HARDCODED 

Definition at line 62 of file rdf.h.

◆ RDF_Format

enum RDF_Format

Describes how a given RDF entity should be edited.

Enumerator
RDF_FORMAT_LINE 
RDF_FORMAT_MULTILINE 
RDF_FORMAT_SPECIAL 

Definition at line 56 of file rdf.h.

◆ RDFType

enum RDFType

Describes how a given RDF entity is stored in XML.

Enumerator
RDF_CONTENT 
RDF_AGENT 
RDF_RESOURCE 
RDF_XML 
RDF_BAG 

Definition at line 45 of file rdf.h.

Function Documentation

◆ rdf_add_from_preferences()

◆ rdf_find_entity()

struct rdf_work_entity_t * rdf_find_entity ( char const *  name)

◆ rdf_get_license()

struct rdf_license_t * rdf_get_license ( SPDocument doc,
bool  read_only 
)

Attempts to match and retrieve a known RDF/License from the document XML.

Returns
A pointer to the static RDF license structure

Definition at line 1047 of file rdf.cpp.

Referenced by Inkscape::UI::Dialog::add_stats(), sp_png_write_rgba_striped(), and Inkscape::UI::Widget::Licensor::update().

◆ rdf_get_work_entity()

const gchar * rdf_get_work_entity ( SPDocument const *  doc,
struct rdf_work_entity_t entity 
)

Retrieves a known RDF/Work entity's contents from the document XML by name.

Returns
A pointer to the entity's static contents as a string, or NULL if no entity exists
Parameters
entityThe desired RDF/Work entity

Definition at line 885 of file rdf.cpp.

References result.

Referenced by SPDocument::getLanguages(), rdf_add_from_preferences(), Inkscape::Extension::Internal::PdfOutput::save(), Inkscape::UI::Widget::EntityEntry::save_to_preferences(), Inkscape::Extension::Internal::CairoRenderContext::setMetadata(), sp_png_write_rgba_striped(), Inkscape::UI::Widget::EntityLineEntry::update(), and Inkscape::UI::Widget::EntityMultiLineEntry::update().

◆ rdf_set_defaults()

void rdf_set_defaults ( SPDocument doc)

Definition at line 1187 of file rdf.cpp.

Referenced by SPDocument::createDoc().

◆ rdf_set_license()

void rdf_set_license ( SPDocument doc,
struct rdf_license_t const *  license 
)

Stores an RDF/License XML in the document XML.

Parameters
documentWhich document to update
licenseThe desired RDF/License structure to store; NULL drops old license, so can be used for proprietary license.

Definition at line 1146 of file rdf.cpp.

◆ rdf_set_work_entity()

unsigned int rdf_set_work_entity ( SPDocument doc,
struct rdf_work_entity_t entity,
const char *  text 
)

Stores a string into a named RDF/Work entity in the document XML.

Parameters
entityThe desired RDF/Work entity to replace
stringThe string to replace the entity contents with

Variable Documentation

◆ PREFS_METADATA

◆ rdf_licenses

rdf_license_t rdf_licenses[]
extern

Definition at line 179 of file rdf.cpp.

Referenced by Inkscape::UI::Widget::Licensor::init().

◆ rdf_work_entities