193ee2104SAxel Dörfler /* 23f2f8b4cSStephan Aßmus * Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de. 33f2f8b4cSStephan Aßmus * All rights reserved. Distributed under the terms of the MIT License. 493ee2104SAxel Dörfler */ 593ee2104SAxel Dörfler #ifndef _ACCELERANT_PROTOS_H 693ee2104SAxel Dörfler #define _ACCELERANT_PROTOS_H 793ee2104SAxel Dörfler 893ee2104SAxel Dörfler 993ee2104SAxel Dörfler #include <Accelerant.h> 1093ee2104SAxel Dörfler #include "video_overlay.h" 1193ee2104SAxel Dörfler 1293ee2104SAxel Dörfler 1393ee2104SAxel Dörfler #ifdef __cplusplus 1493ee2104SAxel Dörfler extern "C" { 1593ee2104SAxel Dörfler #endif 1693ee2104SAxel Dörfler 1793ee2104SAxel Dörfler // general 1893ee2104SAxel Dörfler status_t vesa_init_accelerant(int fd); 1993ee2104SAxel Dörfler ssize_t vesa_accelerant_clone_info_size(void); 2093ee2104SAxel Dörfler void vesa_get_accelerant_clone_info(void *data); 2193ee2104SAxel Dörfler status_t vesa_clone_accelerant(void *data); 2293ee2104SAxel Dörfler void vesa_uninit_accelerant(void); 2393ee2104SAxel Dörfler status_t vesa_get_accelerant_device_info(accelerant_device_info *adi); 2493ee2104SAxel Dörfler sem_id vesa_accelerant_retrace_semaphore(void); 2593ee2104SAxel Dörfler 2693ee2104SAxel Dörfler // modes & constraints 2793ee2104SAxel Dörfler uint32 vesa_accelerant_mode_count(void); 2893ee2104SAxel Dörfler status_t vesa_get_mode_list(display_mode *dm); 29d16ddc57SAxel Dörfler status_t vesa_propose_display_mode(display_mode *target, 30d16ddc57SAxel Dörfler const display_mode *low, const display_mode *high); 313f2f8b4cSStephan Aßmus status_t vesa_set_display_mode(display_mode *modeToSet); 323f2f8b4cSStephan Aßmus status_t vesa_get_display_mode(display_mode *currentMode); 33d16ddc57SAxel Dörfler status_t vesa_get_edid_info(void *info, size_t size, uint32 *_version); 3493ee2104SAxel Dörfler status_t vesa_get_frame_buffer_config(frame_buffer_config *config); 35d16ddc57SAxel Dörfler status_t vesa_get_pixel_clock_limits(display_mode *dm, uint32 *low, 36d16ddc57SAxel Dörfler uint32 *high); 373f2f8b4cSStephan Aßmus status_t vesa_move_display(uint16 hDisplayStart, uint16 vDisplayStart); 3893ee2104SAxel Dörfler status_t vesa_get_timing_constraints(display_timing_constraints *dtc); 393f2f8b4cSStephan Aßmus void vesa_set_indexed_colors(uint count, uint8 first, uint8 *colorData, 40d16ddc57SAxel Dörfler uint32 flags); 4193ee2104SAxel Dörfler 4293ee2104SAxel Dörfler // DPMS 4393ee2104SAxel Dörfler uint32 vesa_dpms_capabilities(void); 4493ee2104SAxel Dörfler uint32 vesa_dpms_mode(void); 453f2f8b4cSStephan Aßmus status_t vesa_set_dpms_mode(uint32 dpmsFlags); 4693ee2104SAxel Dörfler 4793ee2104SAxel Dörfler // cursor 483f2f8b4cSStephan Aßmus status_t vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hotX, 49*8f6542aaSJohn Scipione uint16 hotY, const uint8 *andMask, const uint8 *xorMask); 50ed80f189SAxel Dörfler status_t vesa_set_cursor_bitmap(uint16 width, uint16 height, uint16 hotX, 51*8f6542aaSJohn Scipione uint16 hotY, color_space colorSpace, uint16 bytesPerRow, 52*8f6542aaSJohn Scipione const uint8* bitmapData); 5393ee2104SAxel Dörfler void vesa_move_cursor(uint16 x, uint16 y); 5493ee2104SAxel Dörfler void vesa_show_cursor(bool is_visible); 5593ee2104SAxel Dörfler 5693ee2104SAxel Dörfler // 2D acceleration 57d16ddc57SAxel Dörfler void vesa_screen_to_screen_blit(engine_token *et, blit_params *list, 58d16ddc57SAxel Dörfler uint32 count); 59d16ddc57SAxel Dörfler void vesa_fill_rectangle(engine_token *et, uint32 color, fill_rect_params *list, 60d16ddc57SAxel Dörfler uint32 count); 61d16ddc57SAxel Dörfler void vesa_invert_rectangle(engine_token *et, fill_rect_params *list, 62d16ddc57SAxel Dörfler uint32 count); 6393ee2104SAxel Dörfler void vesa_fill_span(engine_token *et, uint32 color, uint16 *list, uint32 count); 6493ee2104SAxel Dörfler 6593ee2104SAxel Dörfler // overlay 6693ee2104SAxel Dörfler uint32 vesa_overlay_count(const display_mode *dm); 6793ee2104SAxel Dörfler const uint32 *vesa_overlay_supported_spaces(const display_mode *dm); 6893ee2104SAxel Dörfler uint32 vesa_overlay_supported_features(uint32 a_color_space); 69d16ddc57SAxel Dörfler const overlay_buffer *vesa_allocate_overlay_buffer(color_space cs, uint16 width, 70d16ddc57SAxel Dörfler uint16 height); 7193ee2104SAxel Dörfler status_t vesa_release_overlay_buffer(const overlay_buffer *ob); 72d16ddc57SAxel Dörfler status_t vesa_get_overlay_constraints(const display_mode *dm, 73d16ddc57SAxel Dörfler const overlay_buffer *ob, overlay_constraints *oc); 7493ee2104SAxel Dörfler overlay_token vesa_allocate_overlay(void); 7593ee2104SAxel Dörfler status_t vesa_release_overlay(overlay_token ot); 76d16ddc57SAxel Dörfler status_t vesa_configure_overlay(overlay_token ot, const overlay_buffer *ob, 77d16ddc57SAxel Dörfler const overlay_window *ow, const overlay_view *ov); 7893ee2104SAxel Dörfler 7993ee2104SAxel Dörfler #ifdef __cplusplus 8093ee2104SAxel Dörfler } 8193ee2104SAxel Dörfler #endif 8293ee2104SAxel Dörfler 8393ee2104SAxel Dörfler #endif /* _ACCELERANT_PROTOS_H */ 84