[at-spi2-core: 14/47] Remove superfluous struct names




commit 38cd1f762cbe01f1a76a3c0a06db900a11c2af79
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Jul 8 15:19:58 2022 -0500

    Remove superfluous struct names
    
    Make them all typedefs instead.

 registryd/de-types.h                  | 18 ++++++------------
 registryd/deviceeventcontroller-x11.c |  5 ++---
 registryd/deviceeventcontroller.c     |  6 +++---
 registryd/event-source.c              |  3 +--
 registryd/registry.c                  |  2 +-
 5 files changed, 13 insertions(+), 21 deletions(-)
---
diff --git a/registryd/de-types.h b/registryd/de-types.h
index ea05dda7..d26cc90f 100644
--- a/registryd/de-types.h
+++ b/registryd/de-types.h
@@ -51,9 +51,7 @@ typedef enum {
     Accessibility_KEY_UNLOCKMODIFIERS,
 } Accessibility_KeySynthType;
 
-typedef struct _Accessibility_DeviceEvent Accessibility_DeviceEvent;
-struct _Accessibility_DeviceEvent
-{
+typedef struct {
   Accessibility_EventType type;
   dbus_uint32_t id;
   dbus_uint32_t hw_code;
@@ -61,23 +59,19 @@ struct _Accessibility_DeviceEvent
   dbus_uint32_t timestamp;
   char * event_string;
   dbus_bool_t is_text;
-};
+} Accessibility_DeviceEvent;
 
-typedef struct _Accessibility_EventListenerMode Accessibility_EventListenerMode;
-struct _Accessibility_EventListenerMode
-{
+typedef struct {
   dbus_bool_t synchronous;
   dbus_bool_t preemptive;
   dbus_bool_t global;
-};
+} Accessibility_EventListenerMode;
 
-typedef struct _Accessibility_KeyDefinition Accessibility_KeyDefinition;
-struct _Accessibility_KeyDefinition
-{
+typedef struct {
   dbus_int32_t keycode;
   dbus_int32_t keysym;
   char *keystring;
   dbus_int32_t unused;
-};
+} Accessibility_KeyDefinition;
 
 #endif /* SPI_DE_TYPES_H_ */
diff --git a/registryd/deviceeventcontroller-x11.c b/registryd/deviceeventcontroller-x11.c
index 40973fa2..010fdf0a 100644
--- a/registryd/deviceeventcontroller-x11.c
+++ b/registryd/deviceeventcontroller-x11.c
@@ -64,11 +64,10 @@ static Accessibility_DeviceEvent pressed_event;
 static void wait_for_release_event (XEvent *event, SpiDEController *controller);
 
 static int spi_error_code = 0;
-struct _SpiPoint {
+typedef struct {
     gint x;
     gint y;
-};
-typedef struct _SpiPoint SpiPoint;
+} SpiPoint;
 static SpiPoint last_mouse_pos_static = {0, 0}; 
 static SpiPoint *last_mouse_pos = &last_mouse_pos_static;
 static unsigned int mouse_mask_state = 0;
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 0fe65556..740995f4 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -72,11 +72,11 @@ typedef struct {
 
 /* A pointer to our parent object class */
 static int spi_error_code = 0;
-struct _SpiPoint {
+
+typedef struct {
     gint x;
     gint y;
-};
-typedef struct _SpiPoint SpiPoint;
+} SpiPoint;
 
 static unsigned int mouse_mask_state = 0;
 static unsigned int key_modifier_mask =
diff --git a/registryd/event-source.c b/registryd/event-source.c
index e82908ae..ca4340c5 100644
--- a/registryd/event-source.c
+++ b/registryd/event-source.c
@@ -24,8 +24,7 @@
 
 #include "event-source.h"
 
-typedef struct _DisplaySource
-{
+typedef struct {
   GSource source;
   
   Display *display;
diff --git a/registryd/registry.c b/registryd/registry.c
index 6e4b8ed4..d4a83ae9 100644
--- a/registryd/registry.c
+++ b/registryd/registry.c
@@ -40,7 +40,7 @@ typedef struct
 
 /*---------------------------------------------------------------------------*/
 
-typedef struct _SpiReference
+typedef struct
 {
   gchar *name;
   gchar *path;


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