Add platform-specific support: Windows and X #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds bindings for Allegro 5's platform-specific functions for Windows and the X Window System to DAllegro5.
(This does not add any Mac OS X bindings nor Iphone bindings, and it does not touch the Android bindings. DAllegro5 binds 4 of the 6 Android-specific A5 functions.)
So far, I've thought about where to place these new files and how to name them as D modules. I've also chosen parameter types and return types as sensible as I could. E.g., for that lone X-specific function that wants the X-specific type
XID
, I researched whatXID
can ever be in C, and I use D'suint
instead of requiring a dedicated X header bindings.This code is UNTESTED. Don't merge yet! Windows is only partly tested: Forward-declaring
HWND al_get_win_window_handle(ALLEGRO_DISPLAY*);
works with myimport core.sys.windows.windows
, but I haven't tested any other functions. For X, I haven't tested anything yet. I'll see when I find time to test all of these functions.