libmemphis Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
MemphisRuleSet; MemphisRuleSet* memphis_rule_set_new (); void memphis_rule_set_free (MemphisRuleSet *rules
); void memphis_rule_set_load_from_file (MemphisRuleSet *rules
,const gchar *filename
,GError **error
); void memphis_rule_set_load_from_data (MemphisRuleSet *rules
,const gchar *data
,guint size
,GError **error
); void memphis_rule_set_set_bg_color (MemphisRuleSet *rules
,guint8 r
,guint8 g
,guint8 b
,guint8 a
); void memphis_rule_set_get_bg_color (MemphisRuleSet *rules
,guint8 *r
,guint8 *g
,guint8 *b
,guint8 *a
); GList* memphis_rule_set_get_rule_ids (MemphisRuleSet *rules
); void memphis_rule_set_set_rule (MemphisRuleSet *rules
,MemphisRule *rule
); MemphisRule* memphis_rule_set_get_rule (MemphisRuleSet *rules
,const gchar *id
); gboolean memphis_rule_set_remove_rule (MemphisRuleSet *rules
,const gchar *id
);
This Object defines drawing rules for a MemphisRenderer. The rules can be loaded from an XML file or can they be defined during execution time.
MemphisRuleSet* memphis_rule_set_new ();
Returns : |
a new MemphisRuleSet whithout any rules. |
Since 0.1
void memphis_rule_set_free (MemphisRuleSet *rules
);
Frees the memory of a MemphisRuleSet.
|
a MemphisRuleSet |
Since 0.1
void memphis_rule_set_load_from_file (MemphisRuleSet *rules
,const gchar *filename
,GError **error
);
Load rules from an XML file.
|
a MemphisRuleSet |
|
a path to a rules file |
|
a pointer to a GError or NULL |
Since 0.2
void memphis_rule_set_load_from_data (MemphisRuleSet *rules
,const gchar *data
,guint size
,GError **error
);
Load rules data from an XML file.
|
a MemphisRuleSet |
|
a character array with rules XML data |
|
the size of the array |
|
a pointer to a GError or NULL |
Since 0.2
void memphis_rule_set_set_bg_color (MemphisRuleSet *rules
,guint8 r
,guint8 g
,guint8 b
,guint8 a
);
Sets the background color and transparency rule.
|
a MemphisRuleSet |
|
red color component |
|
green color component |
|
blue color component |
|
transparency |
Since 0.1
void memphis_rule_set_get_bg_color (MemphisRuleSet *rules
,guint8 *r
,guint8 *g
,guint8 *b
,guint8 *a
);
Assigns the background color and the transparency of the background to r, g, b and a.
|
a MemphisRuleSet |
|
red color component. out. |
|
green color component. out. |
|
blue color component. out. |
|
transparency. out. |
Since 0.1
GList* memphis_rule_set_get_rule_ids (MemphisRuleSet *rules
);
|
a MemphisRuleSet |
Returns : |
a list of rule id strings. Free the list with g_list_free when done. These strings have the following form: key1|key2|...|keyN:value1|value2|...|valueM Example: "waterway:river|stream|canal" . transfer full. |
Since 0.1
void memphis_rule_set_set_rule (MemphisRuleSet *rules
,MemphisRule *rule
);
Adds the given rule to the rule set.
|
a MemphisRuleSet |
|
a MemphisRule |
Since 0.1
MemphisRule* memphis_rule_set_get_rule (MemphisRuleSet *rules
,const gchar *id
);
|
a MemphisRuleSet |
|
an id string |
Returns : |
a MemphisRule that has the given id string or NULL otherwise. . allow-none. |
Since 0.1
gboolean memphis_rule_set_remove_rule (MemphisRuleSet *rules
,const gchar *id
);
Removes the rule with the given id from the rules set.
|
a MemphisRuleSet |
|
an id string |
Returns : |
true if the rule could be found and removed. |
Since 0.1