1 /* 2 * Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 6 7 #include "accelerant_protos.h" 8 9 10 // TODO: these are some temporary dummy functions to see if this helps with our 11 // current app_server 12 13 status_t 14 vesa_set_cursor_shape(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y, 15 uint8 *andMask, uint8 *xorMask) 16 { 17 return B_OK; 18 } 19 20 21 void 22 vesa_move_cursor(uint16 x, uint16 y) 23 { 24 } 25 26 27 void 28 vesa_show_cursor(bool is_visible) 29 { 30 } 31 32 33 extern "C" void * 34 get_accelerant_hook(uint32 feature, void *data) 35 { 36 switch (feature) { 37 /* general */ 38 case B_INIT_ACCELERANT: 39 return (void*)vesa_init_accelerant; 40 case B_UNINIT_ACCELERANT: 41 return (void*)vesa_uninit_accelerant; 42 case B_CLONE_ACCELERANT: 43 return (void*)vesa_clone_accelerant; 44 case B_ACCELERANT_CLONE_INFO_SIZE: 45 return (void*)vesa_accelerant_clone_info_size; 46 case B_GET_ACCELERANT_CLONE_INFO: 47 return (void*)vesa_get_accelerant_clone_info; 48 case B_GET_ACCELERANT_DEVICE_INFO: 49 return (void*)vesa_get_accelerant_device_info; 50 case B_ACCELERANT_RETRACE_SEMAPHORE: 51 return (void*)vesa_accelerant_retrace_semaphore; 52 53 /* mode configuration */ 54 case B_ACCELERANT_MODE_COUNT: 55 return (void*)vesa_accelerant_mode_count; 56 case B_GET_MODE_LIST: 57 return (void*)vesa_get_mode_list; 58 case B_PROPOSE_DISPLAY_MODE: 59 return (void*)vesa_propose_display_mode; 60 case B_SET_DISPLAY_MODE: 61 return (void*)vesa_set_display_mode; 62 case B_GET_DISPLAY_MODE: 63 return (void*)vesa_get_display_mode; 64 case B_GET_EDID_INFO: 65 return (void*)vesa_get_edid_info; 66 case B_GET_FRAME_BUFFER_CONFIG: 67 return (void*)vesa_get_frame_buffer_config; 68 case B_GET_PIXEL_CLOCK_LIMITS: 69 return (void*)vesa_get_pixel_clock_limits; 70 case B_MOVE_DISPLAY: 71 return (void*)vesa_move_display; 72 case B_SET_INDEXED_COLORS: 73 return (void*)vesa_set_indexed_colors; 74 case B_GET_TIMING_CONSTRAINTS: 75 return (void*)vesa_get_timing_constraints; 76 77 /* DPMS */ 78 case B_DPMS_CAPABILITIES: 79 return (void*)vesa_dpms_capabilities; 80 case B_DPMS_MODE: 81 return (void*)vesa_dpms_mode; 82 case B_SET_DPMS_MODE: 83 return (void*)vesa_set_dpms_mode; 84 85 /* cursor managment */ 86 case B_SET_CURSOR_SHAPE: 87 return (void*)vesa_set_cursor_shape; 88 case B_MOVE_CURSOR: 89 return (void*)vesa_move_cursor; 90 case B_SHOW_CURSOR: 91 return (void*)vesa_show_cursor; 92 93 /* engine/synchronization */ 94 case B_ACCELERANT_ENGINE_COUNT: 95 return (void*)vesa_accelerant_engine_count; 96 case B_ACQUIRE_ENGINE: 97 return (void*)vesa_acquire_engine; 98 case B_RELEASE_ENGINE: 99 return (void*)vesa_release_engine; 100 case B_WAIT_ENGINE_IDLE: 101 return (void*)vesa_wait_engine_idle; 102 case B_GET_SYNC_TOKEN: 103 return (void*)vesa_get_sync_token; 104 case B_SYNC_TO_TOKEN: 105 return (void*)vesa_sync_to_token; 106 } 107 108 return NULL; 109 } 110 111