mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
For example, the following node:
<keybind name.action="ShowMenu" menu.action="root-menu"
x.position.action="1" y.position.action="2" />
is converted to:
<keybind>
<action>
<name>ShowMenu</name>
<menu>root-menu</menu>
<position>
<x>1</x>
<y>2</y>
</position>
</action>
</keybind>
...before processing the entire xml tree. This is a preparation to prevent
breaking changes when we allow parsing nested 'If' actions (#2427) or when
we drastically refactor rcxml.c to use recursion instead of encoding.
29 lines
637 B
C
29 lines
637 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_XML_H
|
|
#define LABWC_XML_H
|
|
|
|
#include <libxml/tree.h>
|
|
|
|
/*
|
|
* Converts dotted properties into nested nodes.
|
|
* For example, the following node:
|
|
*
|
|
* <keybind name.action="ShowMenu" menu.action="root-menu"
|
|
* x.position.action="1" y.position.action="2" />
|
|
*
|
|
* is converted to:
|
|
*
|
|
* <keybind>
|
|
* <action>
|
|
* <name>ShowMenu</name>
|
|
* <menu>root-menu</menu>
|
|
* <position>
|
|
* <x>1</x>
|
|
* <y>2</y>
|
|
* </position>
|
|
* </action>
|
|
* </keybind>
|
|
*/
|
|
void lab_xml_expand_dotted_props(xmlNode *root);
|
|
|
|
#endif /* LABWC_XML_H */
|