Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform-specific support: Windows and X #55

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SimonN
Copy link
Contributor

@SimonN SimonN commented May 13, 2024

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 what XID can ever be in C, and I use D's uint 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 my import 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.

@SiegeLord
Copy link
Owner

This looks pretty good, thanks! Tell me if you need help testing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants