[retro-gtk/wip/aplazas/gamepad: 5/6] input: Make JoypadId, AnalogIndex and AnalogId private
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/wip/aplazas/gamepad: 5/6] input: Make JoypadId, AnalogIndex and AnalogId private
- Date: Tue, 5 Sep 2017 06:13:08 +0000 (UTC)
commit ead7f5ce4fae88670b2f78c5468b73a32eb9d2f8
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Jul 30 14:18:06 2017 +0100
input: Make JoypadId, AnalogIndex and AnalogId private
This helps reducing the public API.
retro-gtk/input/device.vala | 6 +++---
retro-gtk/input/gamepad-configuration.vala | 2 +-
retro-gtk/input/virtual-gamepad.vala | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/retro-gtk/input/device.vala b/retro-gtk/input/device.vala
index e9ff6da..be6f476 100644
--- a/retro-gtk/input/device.vala
+++ b/retro-gtk/input/device.vala
@@ -37,7 +37,7 @@ public enum DeviceType {
/**
* The input types of a joypad.
*/
-public enum JoypadId {
+private enum JoypadId {
B,
Y,
SELECT,
@@ -60,7 +60,7 @@ public enum JoypadId {
/**
* The analog sticks of an analog joypad.
*/
-public enum AnalogIndex {
+private enum AnalogIndex {
LEFT,
RIGHT,
COUNT,
@@ -69,7 +69,7 @@ public enum AnalogIndex {
/**
* The axes of an analog stick.
*/
-public enum AnalogId {
+private enum AnalogId {
X,
Y,
COUNT,
diff --git a/retro-gtk/input/gamepad-configuration.vala b/retro-gtk/input/gamepad-configuration.vala
index 3263361..8e0190a 100644
--- a/retro-gtk/input/gamepad-configuration.vala
+++ b/retro-gtk/input/gamepad-configuration.vala
@@ -10,7 +10,7 @@ public class Retro.GamepadConfiguration : Object {
public extern void set_to_default ();
public extern void set_button_key (uint16 button, uint16 key);
- public uint16 get_button_key (JoypadId button) {
+ internal uint16 get_button_key (JoypadId button) {
return gamepad_keys[button];
}
}
diff --git a/retro-gtk/input/virtual-gamepad.vala b/retro-gtk/input/virtual-gamepad.vala
index 37eefee..b53e144 100644
--- a/retro-gtk/input/virtual-gamepad.vala
+++ b/retro-gtk/input/virtual-gamepad.vala
@@ -39,7 +39,7 @@ public class Retro.VirtualGamepad : Object, InputDevice {
return 1 << DeviceType.JOYPAD;
}
- public bool get_button_pressed (JoypadId button) {
+ private bool get_button_pressed (JoypadId button) {
return keyboard.get_key_state (configuration.get_button_key (button));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]