@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
|
||||
%gtkdocentities;
|
||||
]>
|
||||
|
||||
<refentry id="build-howto">
|
||||
<refmeta>
|
||||
<refentrytitle>Compiling with &package_string;</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>Compiling with &package_string;</refname><refpurpose>Notes on compiling</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect2>
|
||||
<title>Using pkg-config</title>
|
||||
|
||||
<para> Like other GNOME libraries,
|
||||
<application>&package_string;</application> uses
|
||||
<application>pkg-config</application> to provide compiler options. The
|
||||
package name is
|
||||
"<literal>&package_ver_str;</literal>". So in
|
||||
your <literal>configure.ac</literal> script, you might specify something
|
||||
like: </para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
PKG_CHECK_MODULES(LIBFEEDBACK, [&package_string;-&package_api_version;])
|
||||
AC_SUBST(LIBFEEDBACK_CFLAGS)
|
||||
AC_SUBST(LIBFEEDBACK_LIBS)
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>
|
||||
Or if using Meson/Ninja use a <literal>dependency('&package_string;-&package_api_version;')
|
||||
</literal> dependency.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The "<literal>&package_api_version;</literal>" in the package name is the "API version"
|
||||
(indicating "the version of the <application>&package_string;</application> API
|
||||
that first appeared in version &package_api_version;") and is essentially just part of
|
||||
the package name.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When using the Meson build system you can declare a dependency like
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
dependency(libfeedback-0.0')
|
||||
</programlisting></informalexample>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Acknowledge the Instability</title>
|
||||
|
||||
<para>
|
||||
Since the library is young and is still changing a lot, in order to use it you are required to acknowledge that your are using an unstable API.
|
||||
To do so, <literal>LIBFEEDBACK_USE_UNSTABLE_API</literal> must be defined for compilation to succeed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
From C code or any compatible language, you can prefix your inclusion of the &package_string; header like so:
|
||||
</para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
#define LIBFEEDBACK_USE_UNSTABLE_API
|
||||
#include <libfeedback.h>
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>
|
||||
Including individual headers rather than <literal>libfeedback.h</literal> is not
|
||||
recommended.
|
||||
</para>
|
||||
<para>
|
||||
You can also acknoledge this with the definition option of your C compiler, like <literal>-DFEEDBACK_USE_UNSTABLE_API</literal>.
|
||||
This is required from Vala.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use &package_name; from Vala, you must define the acknowledgment in C via <literal>-X -DFEEDBACK_USE_UNSTABLE_API</literal>.
|
||||
If your build system uses a two pass compilation and hence your Vala compiler outputs C (Meson, Automake, or using the <literal>--ccode</literal> Vala compiler option trigger that) then you must add <literal>-DLIBFEEDBACK_USE_UNSTABLE_API</literal> to your C compiler argments instead.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
</refentry>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||
[
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
|
||||
%gtkdocentities;
|
||||
]>
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>&package_name; Reference Manual</title>
|
||||
<releaseinfo>
|
||||
<para>This document is the API reference for &package_name; &package_version;</para>
|
||||
<para>
|
||||
<ulink type="http" url="&package_url;">Libfeedback</ulink> is a library to trigger
|
||||
feedback (such as haptic feedback) via events sent by your application.
|
||||
</para>
|
||||
<para>
|
||||
If you find any issues in this API reference, please report it using
|
||||
<ulink type="http" url="&package_bugreport;">the bugtracker</ulink>.
|
||||
</para>
|
||||
</releaseinfo>
|
||||
|
||||
<copyright>
|
||||
<year>2020</year>
|
||||
<holder>Purism SPC</holder>
|
||||
</copyright>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="intro">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
The purpose of libfeedback is to trigger audible, haptic and visual feedback based on
|
||||
events. Events are identified by strings.
|
||||
</para>
|
||||
|
||||
<xi:include href="build-howto.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="core-api">
|
||||
<title>Core API</title>
|
||||
<xi:include href="xml/libfeedback.xml"/>
|
||||
<xi:include href="xml/lfb-event.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="low-level-api">
|
||||
<title>Low level api</title>
|
||||
<xi:include href="xml/lfb-gdbus.xml"/>
|
||||
<xi:include href="xml/lfb-names.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="dbus-interface">
|
||||
<title>DBus Interface</title>
|
||||
<xi:include href="../data/libfeedback-org.sigxcpu.Feedback.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="object-tree">
|
||||
<title>Object Hierarchy</title>
|
||||
<xi:include href="xml/tree_index.sgml"/>
|
||||
</chapter>
|
||||
|
||||
<index id="api-index-full">
|
||||
<title>API Index</title>
|
||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<index id="annotations-glossary">
|
||||
<title>Annotations glossary</title>
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
</book>
|
||||
@@ -0,0 +1,40 @@
|
||||
if get_option('gtk_doc')
|
||||
|
||||
subdir('xml')
|
||||
|
||||
private_headers = [
|
||||
]
|
||||
|
||||
content_files = [
|
||||
'build-howto.xml',
|
||||
]
|
||||
|
||||
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
||||
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
|
||||
|
||||
gnome.gtkdoc('libfeedback',
|
||||
main_xml: 'libfeedback-docs.xml',
|
||||
src_dir: [
|
||||
join_paths(meson.source_root(), 'libfeedback'),
|
||||
join_paths(meson.build_root(), 'libfeedback'),
|
||||
join_paths(meson.build_root(), 'data'),
|
||||
],
|
||||
dependencies: libfeedback_dep,
|
||||
gobject_typesfile: 'libfeedback.types',
|
||||
scan_args: [
|
||||
'--rebuild-types',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
|
||||
],
|
||||
install_dir: 'libfeedback',
|
||||
content_files: content_files,
|
||||
install: true)
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,9 @@
|
||||
<!ENTITY package "@PACKAGE@">
|
||||
<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
|
||||
<!ENTITY package_name "@PACKAGE_NAME@">
|
||||
<!ENTITY package_string "@PACKAGE_STRING@">
|
||||
<!ENTITY package_tarname "@PACKAGE_TARNAME@">
|
||||
<!ENTITY package_url "@PACKAGE_URL@">
|
||||
<!ENTITY package_version "@PACKAGE_VERSION@">
|
||||
<!ENTITY package_api_version "@PACKAGE_API_VERSION@">
|
||||
<!ENTITY package_ver_str "@PACKAGE_STRING@-@PACKAGE_API_VERSION@">
|
||||
@@ -0,0 +1,11 @@
|
||||
ent_conf = configuration_data()
|
||||
ent_conf.set('PACKAGE', 'libfeedback')
|
||||
ent_conf.set('PACKAGE_BUGREPORT', 'https://source.puri.sm/Librem5/feedbackd/issues')
|
||||
ent_conf.set('PACKAGE_NAME', 'libfeedback')
|
||||
ent_conf.set('PACKAGE_STRING', 'libfeedback')
|
||||
ent_conf.set('PACKAGE_TARNAME', 'libfeedback-' + meson.project_version())
|
||||
ent_conf.set('PACKAGE_URL', 'https://source.puri.sm/Librem5/feedbackd')
|
||||
ent_conf.set('PACKAGE_VERSION', meson.project_version())
|
||||
ent_conf.set('PACKAGE_API_VERSION', apiversion)
|
||||
configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf)
|
||||
|
||||
Reference in New Issue
Block a user