Commit df3ff580 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

gamepad: Remove specific gamepad event signals

Drop the '*-event' signals as they are neither listened nor emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=782611
parent 718d7aa7
......@@ -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,
};
......@@ -71,93 +64,6 @@ games_raw_gamepad_default_init (GamesRawGamepadInterface *iface)
G_TYPE_NONE, 1,
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:
*
......
......@@ -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; }
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment