dc_hw.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * File : dc_buffer.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2010-04-10 Bernard first version
  13. */
  14. #ifndef __RTGUI_DC_HW_H__
  15. #define __RTGUI_DC_HW_H__
  16. #include <rtgui/dc.h>
  17. /* hardware device context */
  18. struct rtgui_dc_hw
  19. {
  20. struct rtgui_dc parent;
  21. /* widget owner */
  22. rtgui_widget_t* owner;
  23. /* visible */
  24. rt_bool_t visible;
  25. /* display driver */
  26. struct rtgui_graphic_driver* device;
  27. };
  28. /* create a hardware dc */
  29. struct rtgui_dc* rtgui_dc_hw_create(rtgui_widget_t* owner);
  30. struct rtgui_dc* rtgui_dc_begin_drawing(rtgui_widget_t* owner);
  31. void rtgui_dc_end_drawing(struct rtgui_dc* dc);
  32. /* draw a hline with raw pixel data */
  33. void rtgui_dc_hw_draw_raw_hline(struct rtgui_dc_hw* dc, rt_uint8_t* raw_ptr, int x1, int x2, int y);
  34. #endif