1 /* 2 * Copyright 2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel Dörfler, axeld@pinc-software.de 7 */ 8 #ifndef ACCELERANT_PROTOS_H 9 #define ACCELERANT_PROTOS_H 10 11 12 #include <Accelerant.h> 13 #include "video_overlay.h" 14 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 // general 21 status_t intel_init_accelerant(int fd); 22 ssize_t intel_accelerant_clone_info_size(void); 23 void intel_get_accelerant_clone_info(void *data); 24 status_t intel_clone_accelerant(void *data); 25 void intel_uninit_accelerant(void); 26 status_t intel_get_accelerant_device_info(accelerant_device_info *info); 27 sem_id intel_accelerant_retrace_semaphore(void); 28 29 // modes & constraints 30 uint32 intel_accelerant_mode_count(void); 31 status_t intel_get_mode_list(display_mode *dm); 32 status_t intel_propose_display_mode(display_mode *target, const display_mode *low, 33 const display_mode *high); 34 status_t intel_set_display_mode(display_mode *mode); 35 status_t intel_get_display_mode(display_mode *currentMode); 36 status_t intel_get_frame_buffer_config(frame_buffer_config *config); 37 status_t intel_get_pixel_clock_limits(display_mode *mode, uint32 *low, uint32 *high); 38 status_t intel_move_display(uint16 hDisplayStart, uint16 vDisplayStart); 39 status_t intel_get_timing_constraints(display_timing_constraints *constraints); 40 void intel_set_indexed_colors(uint count, uint8 first, uint8 *colorData, uint32 flags); 41 42 // DPMS 43 uint32 intel_dpms_capabilities(void); 44 uint32 intel_dpms_mode(void); 45 status_t intel_set_dpms_mode(uint32 flags); 46 47 // cursor 48 status_t intel_set_cursor_shape(uint16 width, uint16 height, uint16 hotX, uint16 hotY, 49 uint8 *andMask, uint8 *xorMask); 50 void intel_move_cursor(uint16 x, uint16 y); 51 void intel_show_cursor(bool isVisible); 52 53 // accelerant engine 54 uint32 intel_accelerant_engine_count(void); 55 status_t intel_acquire_engine(uint32 capabilities, uint32 maxWait, 56 sync_token *syncToken, engine_token **_engineToken); 57 status_t intel_release_engine(engine_token *engineToken, sync_token *syncToken); 58 void intel_wait_engine_idle(void); 59 status_t intel_get_sync_token(engine_token *engineToken, sync_token *syncToken); 60 status_t intel_sync_to_token(sync_token *syncToken); 61 62 // 2D acceleration 63 void intel_screen_to_screen_blit(engine_token *engineToken, blit_params *list, uint32 count); 64 void intel_fill_rectangle(engine_token *engineToken, uint32 color, fill_rect_params *list, 65 uint32 count); 66 void intel_invert_rectangle(engine_token *engineToken, fill_rect_params *list, uint32 count); 67 void intel_fill_span(engine_token *engineToken, uint32 color, uint16 *list, uint32 count); 68 69 // overlay 70 uint32 intel_overlay_count(const display_mode *mode); 71 const uint32 *intel_overlay_supported_spaces(const display_mode *mode); 72 uint32 intel_overlay_supported_features(uint32 colorSpace); 73 const overlay_buffer *intel_allocate_overlay_buffer(color_space space, uint16 width, 74 uint16 height); 75 status_t intel_release_overlay_buffer(const overlay_buffer *buffer); 76 status_t intel_get_overlay_constraints(const display_mode *mode, const overlay_buffer *buffer, 77 overlay_constraints *constraints); 78 overlay_token intel_allocate_overlay(void); 79 status_t intel_release_overlay(overlay_token overlayToken); 80 status_t intel_configure_overlay(overlay_token overlayToken, const overlay_buffer *buffer, 81 const overlay_window *window, const overlay_view *view); 82 83 #ifdef __cplusplus 84 } 85 #endif 86 87 #endif /* ACCELERANT_PROTOS_H */ 88