Closed sebastinas closed 5 months ago
On GitLab by @rmorales on Sep 21, 2023, 20:58
For the project to be compiled, it is necessary to include internal.h
to the list of header files in meson.build
(see reasoning below) from the girara
repository. I've opened a merge request in the girara repository: !11
If internal.h
is not included, the compiler fails with the following error:
In file included from ../source/zathura/types.h:6,
from ../source/zathura/dbus-interface.h:10,
from ../source/zathura/dbus-interface.c:3:
../source/zathura/dbus-interface.c: In function ‘handle_execute_shortcut_function’:
../source/zathura/dbus-interface.c:456:43: error: invalid use of incomplete typedef ‘girara_session_private_t’ {aka ‘struct girara_session_private_s’}
456 | GIRARA_LIST_FOREACH_BODY(session_private->config.shortcut_mappings, girara_shortcut_mapping_t*, data,
| ^~
../source/zathura/dbus-interface.c:457:23: error: invalid use of incomplete typedef ‘girara_shortcut_mapping_t’ {aka ‘struct girara_shortcut_mapping_s’}
457 | if (g_strcmp0(data->identifier, shortcut_function_string) == 0) {
| ^~
../source/zathura/dbus-interface.c:458:31: error: invalid use of incomplete typedef ‘girara_shortcut_mapping_t’ {aka ‘struct girara_shortcut_mapping_s’}
458 | shortcut_function = data->function;
| ^~
../source/zathura/dbus-interface.c:464:43: error: invalid use of incomplete typedef ‘girara_session_private_t’ {aka ‘struct girara_session_private_s’}
464 | GIRARA_LIST_FOREACH_BODY(session_private->config.argument_mappings, girara_argument_mapping_t*, mapping,
| ^~
../source/zathura/dbus-interface.c:465:26: error: invalid use of incomplete typedef ‘girara_argument_mapping_t’ {aka ‘struct girara_argument_mapping_s’}
465 | if (g_strcmp0(mapping->identifier, argument_string) == 0) {
| ^~
../source/zathura/dbus-interface.c:466:28: error: invalid use of incomplete typedef ‘girara_argument_mapping_t’ {aka ‘struct girara_argument_mapping_s’}
466 | argument->n = mapping->value;
On GitLab by @rmorales on Sep 21, 2023, 21:02
mentioned in merge request girara!11
I think it is best to add a new function in girara that handles the execution of the function. These are all girara internals.
This MR is not merge-able as is.
On GitLab by @rmorales on Sep 21, 2023, 20:37
Merges develop -> develop
The introduced changes make it possible to execute any shortcut function through the DBus interface. Here are some examples:
Navigate 1 page below.
Navigate to the 10nth page below.
Scroll down with a magnitude 1
Scroll down with a magnitude 10
Toggle the index
Navigate index (assuming that the current view has enabled the index)