diff options
author | Mathias Agopian <mathias@google.com> | 2009-08-19 11:20:55 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-08-19 11:20:55 -0700 |
commit | 9d82c1a447a72a2c086b9cd34c5b73b163d7acbc (patch) | |
tree | 56fd1762973e253719869c09c7d80f74c3b3c6f8 /include/hardware/hardware.h | |
parent | ed04f7871bab3cb07e47e42fe4d9ebe5b02281a2 (diff) | |
download | hardware_libhardware-9d82c1a447a72a2c086b9cd34c5b73b163d7acbc.zip hardware_libhardware-9d82c1a447a72a2c086b9cd34c5b73b163d7acbc.tar.gz hardware_libhardware-9d82c1a447a72a2c086b9cd34c5b73b163d7acbc.tar.bz2 |
add typedefs to gralloc and hardware.h so it's more C friendly
Diffstat (limited to 'include/hardware/hardware.h')
-rw-r--r-- | include/hardware/hardware.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h index 4d34852..ee5123d 100644 --- a/include/hardware/hardware.h +++ b/include/hardware/hardware.h @@ -42,7 +42,7 @@ struct hw_device_t; * and the fields of this data structure must begin with hw_module_t * followed by module specific information. */ -struct hw_module_t { +typedef struct hw_module_t { /** tag must be initialized to HARDWARE_MODULE_TAG */ uint32_t tag; @@ -69,19 +69,21 @@ struct hw_module_t { /** padding to 128 bytes, reserved for future use */ uint32_t reserved[32-7]; -}; -struct hw_module_methods_t { +} hw_module_t; + +typedef struct hw_module_methods_t { /** Open a specific device */ int (*open)(const struct hw_module_t* module, const char* id, struct hw_device_t** device); -}; + +} hw_module_methods_t; /** * Every device data structure must begin with hw_device_t * followed by module specific public methods and attributes. */ -struct hw_device_t { +typedef struct hw_device_t { /** tag must be initialized to HARDWARE_DEVICE_TAG */ uint32_t tag; @@ -96,7 +98,8 @@ struct hw_device_t { /** Close this device */ int (*close)(struct hw_device_t* device); -}; + +} hw_device_t; /** * Name of the hal_module_info |