1*fa50484bSRudolf Cornelissen /* 2*fa50484bSRudolf Cornelissen Copyright 1999, Be Incorporated. All Rights Reserved. 3*fa50484bSRudolf Cornelissen This file may be used under the terms of the Be Sample Code License. 4*fa50484bSRudolf Cornelissen */ 5*fa50484bSRudolf Cornelissen 6*fa50484bSRudolf Cornelissen #if !defined(GENERIC_H) 7*fa50484bSRudolf Cornelissen #define GENERIC_H 8*fa50484bSRudolf Cornelissen 9*fa50484bSRudolf Cornelissen #include <Accelerant.h> 10*fa50484bSRudolf Cornelissen #include "video_overlay.h" 11*fa50484bSRudolf Cornelissen 12*fa50484bSRudolf Cornelissen #define DEBUG 1 13*fa50484bSRudolf Cornelissen 14*fa50484bSRudolf Cornelissen status_t INIT_ACCELERANT(int fd); 15*fa50484bSRudolf Cornelissen ssize_t ACCELERANT_CLONE_INFO_SIZE(void); 16*fa50484bSRudolf Cornelissen void GET_ACCELERANT_CLONE_INFO(void *data); 17*fa50484bSRudolf Cornelissen status_t CLONE_ACCELERANT(void *data); 18*fa50484bSRudolf Cornelissen void UNINIT_ACCELERANT(void); 19*fa50484bSRudolf Cornelissen status_t GET_ACCELERANT_DEVICE_INFO(accelerant_device_info *adi); 20*fa50484bSRudolf Cornelissen sem_id ACCELERANT_RETRACE_SEMAPHORE(void); 21*fa50484bSRudolf Cornelissen 22*fa50484bSRudolf Cornelissen uint32 ACCELERANT_MODE_COUNT(void); 23*fa50484bSRudolf Cornelissen status_t GET_MODE_LIST(display_mode *dm); 24*fa50484bSRudolf Cornelissen status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, const display_mode *high); 25*fa50484bSRudolf Cornelissen status_t SET_DISPLAY_MODE(display_mode *mode_to_set); 26*fa50484bSRudolf Cornelissen status_t GET_DISPLAY_MODE(display_mode *current_mode); 27*fa50484bSRudolf Cornelissen status_t GET_FRAME_BUFFER_CONFIG(frame_buffer_config *a_frame_buffer); 28*fa50484bSRudolf Cornelissen status_t GET_PIXEL_CLOCK_LIMITS(display_mode *dm, uint32 *low, uint32 *high); 29*fa50484bSRudolf Cornelissen status_t MOVE_DISPLAY(uint16 h_display_start, uint16 v_display_start); 30*fa50484bSRudolf Cornelissen status_t GET_TIMING_CONSTRAINTS(display_timing_constraints *dtc); 31*fa50484bSRudolf Cornelissen void SET_INDEXED_COLORS(uint count, uint8 first, uint8 *color_data, uint32 flags); 32*fa50484bSRudolf Cornelissen 33*fa50484bSRudolf Cornelissen uint32 DPMS_CAPABILITIES(void); 34*fa50484bSRudolf Cornelissen uint32 DPMS_MODE(void); 35*fa50484bSRudolf Cornelissen status_t SET_DPMS_MODE(uint32 dpms_flags); 36*fa50484bSRudolf Cornelissen 37*fa50484bSRudolf Cornelissen status_t SET_CURSOR_SHAPE(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y, uint8 *andMask, uint8 *xorMask); 38*fa50484bSRudolf Cornelissen void MOVE_CURSOR(uint16 x, uint16 y); 39*fa50484bSRudolf Cornelissen void SHOW_CURSOR(bool is_visible); 40*fa50484bSRudolf Cornelissen 41*fa50484bSRudolf Cornelissen uint32 ACCELERANT_ENGINE_COUNT(void); 42*fa50484bSRudolf Cornelissen status_t ACQUIRE_ENGINE(uint32 capabilities, uint32 max_wait, sync_token *st, engine_token **et); 43*fa50484bSRudolf Cornelissen status_t RELEASE_ENGINE(engine_token *et, sync_token *st); 44*fa50484bSRudolf Cornelissen void WAIT_ENGINE_IDLE(void); 45*fa50484bSRudolf Cornelissen status_t GET_SYNC_TOKEN(engine_token *et, sync_token *st); 46*fa50484bSRudolf Cornelissen status_t SYNC_TO_TOKEN(sync_token *st); 47*fa50484bSRudolf Cornelissen 48*fa50484bSRudolf Cornelissen void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count); 49*fa50484bSRudolf Cornelissen void SCREEN_TO_SCREEN_TRANSPARENT_BLIT(engine_token *et, uint32 transparent_colour, blit_params *list, uint32 count); 50*fa50484bSRudolf Cornelissen void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT(engine_token *et, scaled_blit_params *list, uint32 count); 51*fa50484bSRudolf Cornelissen void FILL_RECTANGLE(engine_token *et, uint32 color, fill_rect_params *list, uint32 count); 52*fa50484bSRudolf Cornelissen void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count); 53*fa50484bSRudolf Cornelissen void FILL_SPAN(engine_token *et, uint32 color, uint16 *list, uint32 count); 54*fa50484bSRudolf Cornelissen 55*fa50484bSRudolf Cornelissen /* video_overlay */ 56*fa50484bSRudolf Cornelissen uint32 OVERLAY_COUNT(const display_mode *dm); 57*fa50484bSRudolf Cornelissen const uint32 *OVERLAY_SUPPORTED_SPACES(const display_mode *dm); 58*fa50484bSRudolf Cornelissen uint32 OVERLAY_SUPPORTED_FEATURES(uint32 a_color_space); 59*fa50484bSRudolf Cornelissen const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint16 height); 60*fa50484bSRudolf Cornelissen status_t RELEASE_OVERLAY_BUFFER(const overlay_buffer *ob); 61*fa50484bSRudolf Cornelissen status_t GET_OVERLAY_CONSTRAINTS(const display_mode *dm, const overlay_buffer *ob, overlay_constraints *oc); 62*fa50484bSRudolf Cornelissen overlay_token ALLOCATE_OVERLAY(void); 63*fa50484bSRudolf Cornelissen status_t RELEASE_OVERLAY(overlay_token ot); 64*fa50484bSRudolf Cornelissen status_t CONFIGURE_OVERLAY(overlay_token ot, const overlay_buffer *ob, const overlay_window *ow, const overlay_view *ov); 65*fa50484bSRudolf Cornelissen 66*fa50484bSRudolf Cornelissen status_t create_mode_list(void); 67*fa50484bSRudolf Cornelissen 68*fa50484bSRudolf Cornelissen #endif 69