1 /* 2 * Copyright 2005-2012, Axel Dörfler, axeld@pinc-software.de. 3 * Copyright 2016, Jessica Hamilton, jessica.l.hamilton@gmail.com 4 * All rights reserved. Distributed under the terms of the MIT License. 5 */ 6 7 8 #include "accelerant_protos.h" 9 #include "accelerant.h" 10 11 #include <new> 12 13 14 extern "C" void* 15 get_accelerant_hook(uint32 feature, void* data) 16 { 17 switch (feature) { 18 /* general */ 19 case B_INIT_ACCELERANT: 20 return (void*)framebuffer_init_accelerant; 21 case B_UNINIT_ACCELERANT: 22 return (void*)framebuffer_uninit_accelerant; 23 case B_CLONE_ACCELERANT: 24 return (void*)framebuffer_clone_accelerant; 25 case B_ACCELERANT_CLONE_INFO_SIZE: 26 return (void*)framebuffer_accelerant_clone_info_size; 27 case B_GET_ACCELERANT_CLONE_INFO: 28 return (void*)framebuffer_get_accelerant_clone_info; 29 case B_GET_ACCELERANT_DEVICE_INFO: 30 return (void*)framebuffer_get_accelerant_device_info; 31 case B_ACCELERANT_RETRACE_SEMAPHORE: 32 return (void*)framebuffer_accelerant_retrace_semaphore; 33 34 /* mode configuration */ 35 case B_ACCELERANT_MODE_COUNT: 36 return (void*)framebuffer_accelerant_mode_count; 37 case B_GET_MODE_LIST: 38 return (void*)framebuffer_get_mode_list; 39 case B_SET_DISPLAY_MODE: 40 return (void*)framebuffer_set_display_mode; 41 case B_GET_DISPLAY_MODE: 42 return (void*)framebuffer_get_display_mode; 43 case B_GET_FRAME_BUFFER_CONFIG: 44 return (void*)framebuffer_get_frame_buffer_config; 45 case B_GET_PIXEL_CLOCK_LIMITS: 46 return (void*)framebuffer_get_pixel_clock_limits; 47 } 48 49 return NULL; 50 } 51 52