1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
/*
* gxr
* Copyright 2019 Collabora Ltd.
* Author: Christoph Haag <christoph.haag@collabora.com>
* SPDX-License-Identifier: MIT
*/
#include <gxr.h>
int
main ()
{
GError *error = NULL;
GInputStream *actions_stream =
g_resources_open_stream ("/res/bindings/actions.json",
G_RESOURCE_LOOKUP_FLAGS_NONE,
&error);
if (error)
{
g_print ("Unable to load action resource: %s\n", error->message);
g_error_free (error);
return 1;
}
GInputStream *bindings_stream =
g_resources_open_stream ("/res/bindings/bindings_knuckles_controller.json",
G_RESOURCE_LOOKUP_FLAGS_NONE,
&error);
if (error)
{
g_print ("Unable to load binding resource: %s\n", error->message);
g_error_free (error);
return 1;
}
GxrManifest *manifest = gxr_manifest_new ();
gxr_manifest_load (manifest, actions_stream, bindings_stream);
g_object_unref (actions_stream);
g_object_unref (manifest);
}
|