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

How to use dlangui in dynamic library for Mac? #623

Open
EasyLian opened this issue Sep 27, 2022 · 2 comments
Open

How to use dlangui in dynamic library for Mac? #623

EasyLian opened this issue Sep 27, 2022 · 2 comments

Comments

@EasyLian
Copy link

I am making a plugin for other software and want to use dlangui as the GUI for the plugin. Luckily I've achieved this on windows, unfortunately I can't initialize dlangui on mac, can anyone provide ideas? Thank you very much!

My successful code on windows:

        import dlangui.platforms.windows.winapp;
        auto ulib = LoadLibraryA("user32.dll");
        alias SetProcessDPIAwareFunc = int function();
        auto setDpiFunc = cast(SetProcessDPIAwareFunc) GetProcAddress(ulib, "SetProcessDPIAware");
        if (setDpiFunc) // Should never fail, but just in case...
            setDpiFunc();
        auto w32platform = new Win32Platform();
        if (!w32platform.registerWndClass())
        {
            MessageBoxA(null, "This program requires Windows NT!", "DLANGUI App".toStringz, MB_ICONERROR);
            return false;
        }
        initFontManager();
        initResourceManagers();

        currentTheme = createDefaultTheme();
        Platform.setInstance(w32platform);
@GrimMaple
Copy link
Collaborator

Hi! Unfortunately, I don't own any Mac machinery, so I can't be of much help here. I know for a fact that dlangui uses SDL on Mac, so that's something you'd have to look into when working on this problem.
I'll try to ask around D Discord server if anyone can help though

@EasyLian
Copy link
Author

Hi! Unfortunately, I don't own any Mac machinery, so I can't be of much help here. I know for a fact that dlangui uses SDL on Mac, so that's something you'd have to look into when working on this problem. I'll try to ask around D Discord server if anyone can help though

OK, thank you very much. If I have my own research results, I will also publish them here.

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

No branches or pull requests

2 participants