master
Avril 4 years ago
parent 1f30071f6e
commit e5c3f0deb0
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -12,45 +12,45 @@
- [-] `GHOST_Types.h`
- [X] /Handles/
- [X] GHOST_SystemHandle
- [X] GHOST_TimerTaskHandle
- [X] GHOST_WindowHandle
- [X] GHOST_EventHandle
- [X] GHOST_RectangleHandle
- [X] GHOST_EventConsumerHandle
- [X] GHOST_ContextHandle
- [X] GHOST_XrContextHandle
- [X] GHOST_SystemHandle
- [X] GHOST_TimerTaskHandle
- [X] GHOST_WindowHandle
- [X] GHOST_EventHandle
- [X] GHOST_RectangleHandle
- [X] GHOST_EventConsumerHandle
- [X] GHOST_ContextHandle
- [X] GHOST_XrContextHandle
- [-] /Primitives/ (ones that begin with =T= I count as `primitive')
- [X] GHOST_TInt8
- [X] GHOST_TUns8
- [X] GHOST_Tint16
- [X] GHOST_TUns16
- [X] GHOST_Tint32
- [X] GHOST_TUns32
- [X] GHOST_TInt64
- [X] GHOST_TUns64
- [X] GHOST_TUserDataPtr
- [X] GHOST_TSuccess
- [X] GHOST_TTabletMode
- [X] GHOST_TTabletAPI
- [X] GHOST_TVisibility
- [X] GHOST_TFireTimeConstant
- [X] GHOST_TModifierKeyMask
- [X] GHOST_TWindowState
- [X] GHOST_TWindowOrder
- [X] GHOST_TDrawingContextType
- [X] GHOST_TButtonMask
- [X] GHOST_TEventType
- [ ] GHOST_TStandardCursor
- [ ] GHOST_TKey
- [X] GHOST_TInt8
- [X] GHOST_TUns8
- [X] GHOST_Tint16
- [X] GHOST_TUns16
- [X] GHOST_Tint32
- [X] GHOST_TUns32
- [X] GHOST_TInt64
- [X] GHOST_TUns64
- [X] GHOST_TUserDataPtr
- [X] GHOST_TSuccess
- [X] GHOST_TTabletMode
- [X] GHOST_TTabletAPI
- [X] GHOST_TVisibility
- [X] GHOST_TFireTimeConstant
- [X] GHOST_TModifierKeyMask
- [X] GHOST_TWindowState
- [X] GHOST_TWindowOrder
- [X] GHOST_TDrawingContextType
- [X] GHOST_TButtonMask
- [X] GHOST_TEventType
- [ ] GHOST_TStandardCursor
- [ ] GHOST_TKey
- [X] /Structures/
- [X] GHOST_GLSettings
- [X] GHOST_GLFlags
- [X] GHOST_DialogOptions
- [X] GHOST_TabletData
- [X] GHOST_GLSettings
- [X] GHOST_GLFlags
- [X] GHOST_DialogOptions
- [X] GHOST_TabletData
- [X] /Constants/
- [X] =GHOST_TABLET_DATA_NONE=
* reimpl as ~const fn~ (~GHOST_TabletData::none()~)
- [X] =GHOST_TABLET_DATA_NONE=
* reimpl as ~const fn~ (~GHOST_TabletData::none()~)
*** Native Rust API
I provide more Rust idiomatic API for some things. They may or may not share ABI, if they do they will have type aliases to the corresponding ~GHOST_~ identifier, so always use those when ABI compatability is desired.
@ -58,9 +58,9 @@
**** Overview
List and implementation status of features
- [-] Types
- [X] [[Handles]]: ~handle.rs~
- [ ] Events: ~event.rs~
- [-] Types
- [X] [[Handles]]: ~handle.rs~
- [ ] Events: ~event.rs~
**** Handles
Handles keep the C ABI, but are re-wrtten with traits to be more idiomatic.
@ -70,12 +70,12 @@
Since handles are just types pointers, they are only ever used as such and shouldn't exist themselves.
***** Example
#+BEGIN_SRC rust
extern "C" unsafe fn internal_call(window: GHOST_WindowHandle) -> GHOST_TSuccess;
extern "C" unsafe fn internal_call(window: GHOST_WindowHandle) -> GHOST_TSuccess;
fn do_something_to_window(window: &mut Handle<Window>) -> Result<()>
{
unsafe {
internal_call(window as GHOST_WindowHandle).into()
}
}
fn do_something_to_window(window: &mut Handle<Window>) -> Result<()>
{
unsafe {
internal_call(window as GHOST_WindowHandle).into()
}
}
#+END_SRC

Loading…
Cancel
Save