⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iohidlib.h

📁 SDL库 在进行视频显示程序spcaview安装时必须的库文件
💻 H
📖 第 1 页 / 共 3 页
字号:
/*! @function createAsyncPort    @abstract Creates an async port.    @discussion This will be used with createAsyncEventSource.    @param port The newly created async port.    @result Returns an IOReturn code.*/    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);    /*! @function getAsyncPort    @abstract Obtains the current async port.    @result Returns a mach_port_t.*/    mach_port_t (*getAsyncPort)(void * self);    /*! @function create    @abstract Creates the current queue.     @param flags    @param depth The maximum number of elements in the queue         before the oldest elements in the queue begin to be lost.    @result Returns an IOReturn code. */    IOReturn (*create)(void * 			self,                         UInt32 			flags,                        UInt32			depth);/*! @function create    @abstract Disposes of the current queue.     @result Returns an IOReturn code. */    IOReturn (*dispose)(void * self);    /*! @function addElement    @abstract Adds an element to the queue.    @discussion If the element has already been added to queue,        an error will be returned.    @param elementCookie The element of interest.     @param flags     @result Returns an IOReturn code. */    IOReturn (*addElement)(void * self,                           IOHIDElementCookie elementCookie,                           UInt32 flags);/*! @function removeElement    @abstract Removes an element from the queue.    @discussion If the element has not been added to queue,        an error will be returned.    @param elementCookie The element of interest.     @result Returns an IOReturn code. */    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);    /*! @function hasElement    @abstract Checks whether an element has been added to         the queue.    @discussion Will return true if present, otherwise will return false.    @param elementCookie The element of interest.     @result Returns a Boolean value. */    Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie);/*! @function start    @abstract Starts event delivery to the queue.     @result Returns an IOReturn code. */    IOReturn (*start)(void * self);    /*! @function stop    @abstract Stops event delivery to the queue.     @result Returns an IOReturn code. */    IOReturn (*stop)(void * self);/*! @function getNextEvent    @abstract Reads next event from the queue.    @param event The event that will be filled.  If a long value is        present, it is up to the caller to deallocate it.    @param maxtime UNSUPPORTED.  If non-zero, limits read events to         those that occured on or before maxTime.    @param timoutMS UNSUPPORTED.  The timeout in milliseconds, a zero          timeout will cause this call to be non-blocking (returning          queue empty) if there is a NULL callback, and blocking forever         until the queue is non-empty if there is a valid callback.    @result Returns an IOReturn code. */    IOReturn (*getNextEvent)(void * 			self,                            IOHIDEventStruct *		event,                            AbsoluteTime		maxTime,                            UInt32 			timeoutMS);/*! @function setEventCallout    @abstract Sets the event callout to be called when the queue         transitions to non-empty.    @discussion In order for this to work correctly, you must call        createAsyncPort and createAsyncEventSource.    @param callback if non-NULL is a callback to be called when data         is  inserted to the queue    @param callbackTarget The callback target passed to the callback    @param callbackRefcon The callback refcon passed to the callback.    @result Returns an IOReturn code.*/    IOReturn (*setEventCallout)(void * 			self,                                IOHIDCallbackFunction   callback,                                void * 			callbackTarget,                                void *			callbackRefcon);/*! @function getEventCallout    @abstract Gets the event callout.    @discussion This callback will be called the queue transitions        to non-empty.    @param callback if non-NULL is a callback to be called when data         is  inserted to the queue    @param callbackTarget The callback target passed to the callback    @param callbackRefcon The callback refcon passed to the callback     @result Returns an IOReturn code. */    IOReturn (*getEventCallout)(void * 			self,                                IOHIDCallbackFunction * outCallback,                                void ** 		outCallbackTarget,                                void **			outCallbackRefcon);} IOHIDQueueInterface;/*! @class IOHIDOutputTransactionInterface    @discussion CFPlugin object subclass which privides interface for output                transactions to HID devices. Created by a IOHIDDeviceInterface                object. */typedef struct IOHIDOutputTransactionInterface{    IUNKNOWN_C_GUTS;                    /*! @function createAsyncEventSource    @abstract Creates an async event source.    @discussion This will be used with setEventCallout.    @param source The newly created event source     @result Returns an IOReturn code. */    IOReturn (*createAsyncEventSource)(void * 			self,                                         CFRunLoopSourceRef * 	source);/*! @function getAsyncEventSource    @abstract Obtains the current event source.    @result Returns a CFRunLoopSourceRef.*/    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);/*! @function createAsyncPort    @abstract Creates an async port.    @discussion This will be used with createAsyncEventSource.    @param port The newly created async port.     @result Returns an IOReturn code. */    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);    /*! @function getAsyncPort    @abstract Obtains the current async port.     @result Returns a mach_port_t.*/    mach_port_t (*getAsyncPort)(void * self);    /*! @function create    @abstract Creates the current transaction.    @discussion This method will free any memory that has been        allocated for this transaction.     @result Returns an IOReturn code.*/    IOReturn (*create)(void * self);    /*! @function dispose    @abstract Disposes of the current transaction.    @discussion The transaction will have to be recreated, in order        to perform any operations on the transaction.     @result Returns an IOReturn code. */    IOReturn (*dispose)(void * self);    /*! @function addElement    @abstract Adds an element to the transaction.    @discussion If the element has already been added to transaction,        an error will be returned.    @param elementCookie The element of interest.    @result Returns an IOReturn code. */    IOReturn (*addElement)	(void * self, IOHIDElementCookie elementCookie);    /*! @function removeElement    @abstract Removes an element from the transaction.    @discussion If the element has not been added to transaction,        an error will be returned.    @param elementCookie The element of interest.     @result Returns an IOReturn code.*/    IOReturn (*removeElement)	(void * self, IOHIDElementCookie elementCookie);    /*! @function hasElement    @abstract Checks whether an element has been added to         the transaction.    @discussion Will return true if present, otherwise will return false.    @param elementCookie The element of interest.     @result Returns a Boolean value. */    Boolean  (*hasElement)	(void * self, IOHIDElementCookie elementCookie);    /*! @function setElementDefault    @abstract Sets the default value of an element in a         transaction.    @discussion An error will be returned if the element has not been        added to the transaction.    @param elementCookie The element of interest.     @param valueEvent The event that will be filled.  If a long value is        present, it will be copied.     @result Returns an IOReturn code. */    IOReturn (*setElementDefault)(void *	 	self,                                    IOHIDElementCookie	elementCookie,                                    IOHIDEventStruct *	valueEvent);    /*! @function getElementDefault    @abstract Obtains the default value of an element in a         transaction.    @discussion An error will be returned if the element has not been         added to the transaction.    @param elementCookie The element of interest.     @param outValueEvent The event that will be filled.  If a long value is         present, it is up to the caller to deallocate it.     @result Returns an IOReturn code.*/    IOReturn (*getElementDefault)(void *	 	self,                                    IOHIDElementCookie	elementCookie,                                    IOHIDEventStruct *	outValueEvent);    /*! @function setElementValue    @abstract Sets the value of an element in a transaction.    @discussion An error will be returned if the element has not been        added to the transaction.    @param elementCookie The element of interest.     @param valueEvent The event that will be filled.  If a long value is        present, it will be copied.    @result Returns an IOReturn code. */    IOReturn (*setElementValue)(void *	 		self,                                IOHIDElementCookie	elementCookie,                                IOHIDEventStruct *	valueEvent);    /*! @function getElementValue    @abstract Obtains the value of an element in a transaction.    @discussion An error will be returned if the element has not been         added to the transaction.    @param elementCookie The element of interest.     @param outValueEvent The event that will be filled.  If a long value is         present, it is up to the caller to deallocate it.     @result Returns an IOReturn code.*/    IOReturn (*getElementValue)(void *	 		self,                                IOHIDElementCookie	elementCookie,                                IOHIDEventStruct *	outValueEvent);    /*! @function commit    @abstract Commits the transaction.    @discussion Transaction element values, if set, will be sent to the         device.  Otherwise, the default element value will be used.  If        neither are set, that element will be omitted from the commit.        After a transaction is committed, transaction element values         will be cleared.  Default values will be preserved.    @param timeoutMS UNSUPPORTED    @param callback UNSUPPORTED    @param callbackTarget UNSUPPORTED    @param callbackRefcon UNSUPPORTED     @result Returns an IOReturn code.*/    IOReturn (*commit)(void * 			self,                        UInt32 			timeoutMS,                        IOHIDCallbackFunction   callback,                        void * 			callbackTarget,                        void *			callbackRefcon);    /*! @function clear    @abstract Clears the transaction.    @discussion Transaction element values will cleared.   Default         values will be preserved.     @result Returns an IOReturn code. */    IOReturn (*clear)(void * self);} IOHIDOutputTransactionInterface;#endif__END_DECLS#endif /* !_IOKIT_HID_IOHIDLIB_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -