summaryrefslogtreecommitdiffstats
path: root/native/include/android/native_window.h
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-07-01 18:44:46 -0700
committerDianne Hackborn <hackbod@google.com>2010-07-01 18:44:46 -0700
commit8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb (patch)
tree3967411cd4a849e239a6c79425e90de101c0caf4 /native/include/android/native_window.h
parentf520411a35db5248934a4b50859ca72e3f865593 (diff)
downloadframeworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.zip
frameworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.tar.gz
frameworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.tar.bz2
Get to the point of being able to do native drawing.
A little cleanup. Change-Id: I37ef0557abf330d91d6fe47e81d062206b3bc346
Diffstat (limited to 'native/include/android/native_window.h')
-rw-r--r--native/include/android/native_window.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/native/include/android/native_window.h b/native/include/android/native_window.h
index b3f47b2..678ba3d 100644
--- a/native/include/android/native_window.h
+++ b/native/include/android/native_window.h
@@ -22,6 +22,15 @@
extern "C" {
#endif
+/*
+ * Pixel formats that a window can use.
+ */
+enum {
+ WINDOW_FORMAT_RGBA_8888 = 1,
+ WINDOW_FORMAT_RGBX_8888 = 2,
+ WINDOW_FORMAT_RGB_565 = 4,
+};
+
struct ANativeWindow;
typedef struct ANativeWindow ANativeWindow;
@@ -43,6 +52,22 @@ int32_t ANativeWindow_getHeight(ANativeWindow* window);
*/
int32_t ANativeWindow_getFormat(ANativeWindow* window);
+/*
+ * Change the format and size of the window buffers.
+ *
+ * The width and height control the number of pixels in the buffers, not the
+ * dimensions of the window on screen. If these are different than the
+ * window's physical size, then it buffer will be scaled to match that size
+ * when compositing it to the screen.
+ *
+ * The format may be one of the window format constants above.
+ *
+ * For all of these parameters, if 0 is supplied than the window's base
+ * value will come back in force.
+ */
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
+ int32_t height, int32_t format);
+
#ifdef __cplusplus
};
#endif