Skip to content

Commit

Permalink
Add libkrbn_core_configuration_get_selected_profile_device_mouse_flip…
Browse files Browse the repository at this point in the history
…_*, libkrbn_core_configuration_set_selected_profile_device_mouse_flip_*
  • Loading branch information
tekezo committed Sep 21, 2023
1 parent 5025c20 commit ccc912f
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/lib/libkrbn/include/libkrbn/libkrbn.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,26 @@ bool libkrbn_core_configuration_get_selected_profile_device_disable_built_in_key
void libkrbn_core_configuration_set_selected_profile_device_disable_built_in_keyboard_if_exists(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value);
bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_x(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers);
void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_x(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value);
bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_y(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers);
void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_y(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value);
bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_vertical_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers);
void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_vertical_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value);
bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_horizontal_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers);
void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_horizontal_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value);

//
// libkrbn_complex_modifications_assets_manager
Expand Down
89 changes: 89 additions & 0 deletions src/lib/libkrbn/src/libkrbn_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,3 +599,92 @@ void libkrbn_core_configuration_set_selected_profile_device_disable_built_in_key
}
}
}

bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_x(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
return c->get_core_configuration().get_selected_profile().get_device_mouse_flip_x(identifiers);
}
}
return false;
}

void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_x(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value) {

if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
c->get_core_configuration().get_selected_profile().set_device_mouse_flip_x(identifiers, value);
}
}
}

bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_y(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
return c->get_core_configuration().get_selected_profile().get_device_mouse_flip_y(identifiers);
}
}
return false;
}

void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_y(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
c->get_core_configuration().get_selected_profile().set_device_mouse_flip_y(identifiers, value);
}
}
}

bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_vertical_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
return c->get_core_configuration().get_selected_profile().get_device_mouse_flip_vertical_wheel(identifiers);
}
}
return false;
}

void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_vertical_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
c->get_core_configuration().get_selected_profile().set_device_mouse_flip_vertical_wheel(identifiers, value);
}
}
}

bool libkrbn_core_configuration_get_selected_profile_device_mouse_flip_horizontal_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
return c->get_core_configuration().get_selected_profile().get_device_mouse_flip_horizontal_wheel(identifiers);
}
}
return false;
}

void libkrbn_core_configuration_set_selected_profile_device_mouse_flip_horizontal_wheel(libkrbn_core_configuration* p,
const libkrbn_device_identifiers* device_identifiers,
bool value) {
if (auto c = reinterpret_cast<libkrbn_core_configuration_class*>(p)) {
if (device_identifiers) {
auto identifiers = libkrbn_cpp::make_device_identifiers(*device_identifiers);
c->get_core_configuration().get_selected_profile().set_device_mouse_flip_horizontal_wheel(identifiers, value);
}
}
}

0 comments on commit ccc912f

Please sign in to comment.