summaryrefslogtreecommitdiff
path: root/include/rtdef.h
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-08 15:23:03 +0000
committer[email protected] <[email protected]>2011-06-08 15:23:03 +0000
commita714392b700f7aada312bf19e6690ef048e6ca61 (patch)
treeffebf18810ff8f21e624b41114359067d333fcb5 /include/rtdef.h
parentce5a42cc189f6a2bb18a7d7c7d02ad8737d94a9f (diff)
update graphic driver interface.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1464 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'include/rtdef.h')
-rw-r--r--include/rtdef.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index 16b5439503..f896c1834d 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -56,7 +56,7 @@ typedef rt_uint32_t rt_tick_t; /**< Type for tick count */
typedef rt_base_t rt_flag_t; /**< Type for flags */
typedef rt_ubase_t rt_size_t; /**< Type for size number */
typedef rt_ubase_t rt_dev_t; /**< Type for device */
-typedef rt_uint32_t rt_off_t; /**< Type for offset */
+typedef rt_base_t rt_off_t; /**< Type for offset */
/**
* boolean type definitions
@@ -707,6 +707,21 @@ struct rt_device_rect_info
rt_uint16_t x, y; /**< x, y coordinate */
rt_uint16_t width, height; /**< width and height */
};
+
+/**
+ * graphic operations
+ */
+struct rt_device_graphic_ops
+{
+ void (*set_pixel) (const char* pixel, int x, int y);
+ void (*get_pixel) (char* pixel, int x, int y);
+
+ void (*draw_hline)(const char* pixel, int x1, int x2, int y);
+ void (*draw_vline)(const char* pixel, int x, int y1, int y2);
+
+ void (*blit_line) (const char* pixel, int x, int y, rt_size_t size);
+};
+#define rt_graphix_ops(device) (struct rt_device_graphic_ops*)(device->user_data)
/*@}*/
/**