[gnome-games/wip/aplazas/gamepad-event: 5/15] gamepad: Remove specific gamepad event signals



commit 993a365ac4bf344547184b3b5f427e397c9bb63d
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri May 12 23:18:35 2017 +0200

    gamepad: Remove specific gamepad event signals
    
    Drop the '*-event' signals as they are neither listened nor emitted.

 src/gamepad/raw-gamepad.c    |   94 ------------------------------------------
 src/gamepad/raw-gamepad.vapi |    5 --
 2 files changed, 0 insertions(+), 99 deletions(-)
---
diff --git a/src/gamepad/raw-gamepad.c b/src/gamepad/raw-gamepad.c
index b35f2ab..aebb8b9 100644
--- a/src/gamepad/raw-gamepad.c
+++ b/src/gamepad/raw-gamepad.c
@@ -3,8 +3,6 @@
 #include "raw-gamepad.h"
 
 #include "../event/event.h"
-#include "standard-gamepad-axis.h"
-#include "standard-gamepad-button.h"
 
 /**
  * SECTION:raw-gamepad
@@ -17,11 +15,6 @@ G_DEFINE_INTERFACE (GamesRawGamepad, games_raw_gamepad, G_TYPE_OBJECT)
 /* Signals */
 enum {
   SIGNAL_EVENT,
-  SIGNAL_STANDARD_BUTTON_EVENT,
-  SIGNAL_BUTTON_EVENT,
-  SIGNAL_STANDARD_AXIS_EVENT,
-  SIGNAL_AXIS_EVENT,
-  SIGNAL_DPAD_EVENT,
   SIGNAL_UNPLUGGED,
   LAST_SIGNAL,
 };
@@ -72,93 +65,6 @@ games_raw_gamepad_default_init (GamesRawGamepadInterface *iface)
                   GAMES_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
 
   /**
-   * GamesRawGamepad::standard-button-event:
-   * @button: the standard button emitting the event
-   * @value: %TRUE if the button is pressed, %FALSE otherwise
-   *
-   * Emitted when a standard button is pressed/released.
-   **/
-  signals[SIGNAL_STANDARD_BUTTON_EVENT] =
-    g_signal_new ("standard-button-event",
-                  GAMES_TYPE_RAW_GAMEPAD,
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  NULL,
-                  G_TYPE_NONE, 2,
-                  GAMES_TYPE_STANDARD_GAMEPAD_BUTTON,
-                  G_TYPE_BOOLEAN);
-
-  /**
-   * GamesRawGamepad::button-event:
-   * @button: the code representing the button
-   * @value: %TRUE if the button is pressed, %FALSE otherwise
-   *
-   * Emitted when a button is pressed/released.
-   **/
-  signals[SIGNAL_BUTTON_EVENT] =
-    g_signal_new ("button-event",
-                  GAMES_TYPE_RAW_GAMEPAD,
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  NULL,
-                  G_TYPE_NONE, 2,
-                  G_TYPE_INT,
-                  G_TYPE_BOOLEAN);
-
-  /**
-   * GamesRawGamepad::standard-axis-event:
-   * @axis: the standard axis emitting the event
-   * @value: the value of the axis ranging from -1 to 1
-   *
-   * Emitted when a standard axis' value changes.
-   **/
-  signals[SIGNAL_STANDARD_AXIS_EVENT] =
-    g_signal_new ("standard-axis-event",
-                  GAMES_TYPE_RAW_GAMEPAD,
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  NULL,
-                  G_TYPE_NONE, 2,
-                  GAMES_TYPE_STANDARD_GAMEPAD_AXIS,
-                  G_TYPE_DOUBLE);
-
-  /**
-   * GamesRawGamepad::axis-event:
-   * @axis: the code representing the axis
-   * @value: the value of the axis ranging from -1 to 1
-   *
-   * Emitted when an axis' value changes.
-   **/
-  signals[SIGNAL_AXIS_EVENT] =
-    g_signal_new ("axis-event",
-                  GAMES_TYPE_RAW_GAMEPAD,
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  NULL,
-                  G_TYPE_NONE, 2,
-                  G_TYPE_INT,
-                  G_TYPE_DOUBLE);
-
-  /**
-   * GamesRawGamepad::dpad-event:
-   * @dpad: the code representing the dpad
-   * @axis: the axis: 0 for X, 1 for Y
-   * @value: the value of the axis ranging from -1 to 1
-   *
-   * Emitted when a dpad's axis value changes.
-   **/
-  signals[SIGNAL_DPAD_EVENT] =
-    g_signal_new ("dpad-event",
-                  GAMES_TYPE_RAW_GAMEPAD,
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  NULL,
-                  G_TYPE_NONE, 3,
-                  G_TYPE_INT,
-                  G_TYPE_INT,
-                  G_TYPE_INT);
-
-  /**
    * GamesRawGamepad::unplugged:
    *
    * Emitted when the gamepad is unplugged.
diff --git a/src/gamepad/raw-gamepad.vapi b/src/gamepad/raw-gamepad.vapi
index ed837f5..7c4099d 100644
--- a/src/gamepad/raw-gamepad.vapi
+++ b/src/gamepad/raw-gamepad.vapi
@@ -3,11 +3,6 @@
 [CCode (cheader_filename = "raw-gamepad.h")]
 private interface Games.RawGamepad : GLib.Object {
        public abstract signal void event (Event event);
-       public abstract signal void standard_button_event (StandardGamepadButton button, bool value);
-       public abstract signal void button_event (int code, bool value);
-       public abstract signal void standard_axis_event (StandardGamepadAxis axis, double value);
-       public abstract signal void axis_event (int axis, double value);
-       public abstract signal void dpad_event (int dpad, int axis, int value);
        public abstract signal void unplugged ();
        public abstract string guid { get; }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]