2 * Copyright 2008-2010 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
9 #include "accelerant.h"
13 get_accelerant_hook(uint32 feature
, void* data
)
15 (void)data
; // avoid compiler warning for unused arg
19 case B_INIT_ACCELERANT
:
20 return (void*)InitAccelerant
;
21 case B_UNINIT_ACCELERANT
:
22 return (void*)UninitAccelerant
;
23 case B_CLONE_ACCELERANT
:
24 return (void*)CloneAccelerant
;
25 case B_ACCELERANT_CLONE_INFO_SIZE
:
26 return (void*)AccelerantCloneInfoSize
;
27 case B_GET_ACCELERANT_CLONE_INFO
:
28 return (void*)GetAccelerantCloneInfo
;
29 case B_GET_ACCELERANT_DEVICE_INFO
:
30 return (void*)GetAccelerantDeviceInfo
;
31 case B_ACCELERANT_RETRACE_SEMAPHORE
:
35 case B_ACCELERANT_MODE_COUNT
:
36 return (void*)AccelerantModeCount
;
38 return (void*)GetModeList
;
39 case B_PROPOSE_DISPLAY_MODE
:
40 return (void*)ProposeDisplayMode
;
41 case B_SET_DISPLAY_MODE
:
42 return (void*)SetDisplayMode
;
43 case B_GET_DISPLAY_MODE
:
44 return (void*)GetDisplayMode
;
46 case B_GET_PREFERRED_DISPLAY_MODE
:
49 return (void*)GetEdidInfo
;
51 case B_GET_FRAME_BUFFER_CONFIG
:
52 return (void*)GetFrameBufferConfig
;
53 case B_GET_PIXEL_CLOCK_LIMITS
:
54 return (void*)GetPixelClockLimits
;
56 return (void*)MoveDisplay
;
57 case B_SET_INDEXED_COLORS
:
58 return (void*)(TDFX_SetIndexedColors
);
59 case B_GET_TIMING_CONSTRAINTS
:
63 case B_DPMS_CAPABILITIES
:
64 return (void*)(TDFX_DPMSCapabilities
);
66 return (void*)(TDFX_GetDPMSMode
);
68 return (void*)(TDFX_SetDPMSMode
);
71 case B_SET_CURSOR_SHAPE
:
72 return (void*)SetCursorShape
;
74 return (void*)MoveCursor
;
76 return (void*)(TDFX_ShowCursor
);
79 case B_ACCELERANT_ENGINE_COUNT
:
80 return (void*)AccelerantEngineCount
;
81 case B_ACQUIRE_ENGINE
:
82 return (void*)AcquireEngine
;
83 case B_RELEASE_ENGINE
:
84 return (void*)ReleaseEngine
;
85 case B_WAIT_ENGINE_IDLE
:
86 return (void*)WaitEngineIdle
;
87 case B_GET_SYNC_TOKEN
:
88 return (void*)GetSyncToken
;
90 return (void*)SyncToToken
;
93 case B_SCREEN_TO_SCREEN_BLIT
:
94 return (void*)(TDFX_ScreenToScreenBlit
);
95 case B_FILL_RECTANGLE
:
96 return (void*)(TDFX_FillRectangle
);
97 case B_INVERT_RECTANGLE
:
98 return (void*)(TDFX_InvertRectangle
);
100 return (void*)(TDFX_FillSpan
);
103 case B_OVERLAY_COUNT
:
104 return (void*)OverlayCount
;
105 case B_OVERLAY_SUPPORTED_SPACES
:
106 return (void*)OverlaySupportedSpaces
;
107 case B_OVERLAY_SUPPORTED_FEATURES
:
108 return (void*)OverlaySupportedFeatures
;
109 case B_ALLOCATE_OVERLAY_BUFFER
:
110 return (void*)AllocateOverlayBuffer
;
111 case B_RELEASE_OVERLAY_BUFFER
:
112 return (void*)ReleaseOverlayBuffer
;
113 case B_GET_OVERLAY_CONSTRAINTS
:
114 return (void*)GetOverlayConstraints
;
115 case B_ALLOCATE_OVERLAY
:
116 return (void*)AllocateOverlay
;
117 case B_RELEASE_OVERLAY
:
118 return (void*)ReleaseOverlay
;
119 case B_CONFIGURE_OVERLAY
:
120 return (void*)ConfigureOverlay
;
123 return NULL
; // Return null pointer for any feature not handled above