diff options
Diffstat (limited to 'include/system/window.h')
-rw-r--r-- | include/system/window.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/include/system/window.h b/include/system/window.h index 588f9c6..31f202f 100644 --- a/include/system/window.h +++ b/include/system/window.h @@ -26,6 +26,13 @@ #include <system/graphics.h> #include <unistd.h> +#ifndef __UNUSED +#define __UNUSED __attribute__((__unused__)) +#endif +#ifndef __deprecated +#define __deprecated __attribute__((__deprecated__)) +#endif + __BEGIN_DECLS /*****************************************************************************/ @@ -89,10 +96,10 @@ typedef struct ANativeWindowBuffer // Implement the methods that sp<ANativeWindowBuffer> expects so that it // can be used to automatically refcount ANativeWindowBuffer's. - void incStrong(const void* id) const { + void incStrong(const void* /*id*/) const { common.incRef(const_cast<android_native_base_t*>(&common)); } - void decStrong(const void* id) const { + void decStrong(const void* /*id*/) const { common.decRef(const_cast<android_native_base_t*>(&common)); } #endif @@ -352,10 +359,10 @@ struct ANativeWindow /* Implement the methods that sp<ANativeWindow> expects so that it can be used to automatically refcount ANativeWindow's. */ - void incStrong(const void* id) const { + void incStrong(const void* /*id*/) const { common.incRef(const_cast<android_native_base_t*>(&common)); } - void decStrong(const void* id) const { + void decStrong(const void* /*id*/) const { common.decRef(const_cast<android_native_base_t*>(&common)); } #endif @@ -582,7 +589,7 @@ struct ANativeWindow * android_native_window_t is deprecated. */ typedef struct ANativeWindow ANativeWindow; -typedef struct ANativeWindow android_native_window_t; +typedef struct ANativeWindow android_native_window_t __deprecated; /* * native_window_set_usage(..., usage) @@ -603,13 +610,19 @@ static inline int native_window_set_usage( /* deprecated. Always returns 0. Don't call. */ static inline int native_window_connect( - struct ANativeWindow* window, int api) { + struct ANativeWindow* window __UNUSED, int api __UNUSED) __deprecated; + +static inline int native_window_connect( + struct ANativeWindow* window __UNUSED, int api __UNUSED) { return 0; } /* deprecated. Always returns 0. Don't call. */ static inline int native_window_disconnect( - struct ANativeWindow* window, int api) { + struct ANativeWindow* window __UNUSED, int api __UNUSED) __deprecated; + +static inline int native_window_disconnect( + struct ANativeWindow* window __UNUSED, int api __UNUSED) { return 0; } @@ -664,6 +677,10 @@ static inline int native_window_set_post_transform_crop( */ static inline int native_window_set_active_rect( struct ANativeWindow* window, + android_native_rect_t const * active_rect) __deprecated; + +static inline int native_window_set_active_rect( + struct ANativeWindow* window, android_native_rect_t const * active_rect) { return native_window_set_post_transform_crop(window, active_rect); @@ -691,6 +708,10 @@ static inline int native_window_set_buffer_count( */ static inline int native_window_set_buffers_geometry( struct ANativeWindow* window, + int w, int h, int format) __deprecated; + +static inline int native_window_set_buffers_geometry( + struct ANativeWindow* window, int w, int h, int format) { return window->perform(window, NATIVE_WINDOW_SET_BUFFERS_GEOMETRY, |