Thank you! This helped me a lot. Also, there is a mac folder (grmac.c) inside of the graph. As I tested, it is not in use in my machine. Apps are working fine without it. Should remain it?
Best, Goksu goksu.in On Jun 22, 2024 at 16:38 +0300, Alexei Podtelezhnikov <apodt...@gmail.com>, wrote: > Hi Akhmet, > > Going in the opposite order: > - grinit.c should have an entry for you new driver, which should > reside in a subfolder, which should contain rules.mk, which should > detect macOS. Once set up properly, you should have your driver > compiled in. > - grInitDevices() is the first call (see inside FTDemo_display_New). > This does not open the window yet. This only prepares for it: > RegisterClass in Windows, XOpenDisplay and get details of appropriate > Visual in X11. > - grNewSurface(...) actually opens the window of the requested size > and the requested (or default) color depth. Or returns NULL and causes > termination. The return surface object will be used for future > communication with the open window. It also hosts the frame buffer > that is projected in the windows > - grRefreshSurface does just that: looks at the surface frame buffer > and displays it > - grListenSurface communicates the key presses and window resizes so > that the main program modifies the frame buffer and back to > grRefreshSurface, etc, etc, etc > > Alexei > > > On Fri, Jun 21, 2024 at 8:21 AM Ahmet Göksu <ah...@goksu.in> wrote: > > > > Hello, > > I apologize for my recent silence due to exams. Thank you for your > > understanding. I am now able to be more active. > > > > Here's the updates so far with the Graph Demos Swift support: > > -studied the code in grx11.c > > -studied the code in ftgamma.c > > -studied how they built by makefiles > > -developed a demo using cocoa and swiftui > > https://github.com/goeksu/GraphDemo > > This demo opens a window, displays a test bitmap, and logs keyboard strikes. > > > > while the development process has been easy and basic so far, I am now > > facing the challenge of figuring out how to integrate this into the > > existing codebase. I would greatly appreciate any guidance or assistance > > you can provide in this matter.. > > > > Best, > > Goksu > > goksu.in >