Hello,
The backend implementation source code could be found at: https://codeberg.org/li-yiyang/McCLIM/src/branch/backend-coca (backend-coca branch, under Backends/coca)
The current screenshot could be see at: https://mastodon.social/@lucky_magick/116279407124461376
congrats, getting something working is a big step. Note that recently I've merged a big set of changes to the branch master and I'm preparing for the release with a few missing things to address. That should help with typing flicker that you are observing (among other things).
1. Issue: the scrolling part effective height is not stretched down correctly
2. Need Advice: how to suppress the menu-bar to use native menu-bar? I read on the manual that it's possible. It's sad that currently if triggering menu-bar would pop drop down menu in another window, which would cause current backend crash.
Backends are in reality two different abstractions: - port - events, windows etc - frame managers - maps abstract panes to backend-specific classes If you take a look at the file Core/clim-core/frame-managers.lisp, you will notice the function GENERATE-PANES that is specialized to the STANDARD-FRAME-MANAGER and STANDARD-APPLICATION-FRAME -- it calls a local function ADOPT-FRAME-PANES that injects the menu bar and the pointer documentation pane; what you need to do is to subclass STANDARD-FRAME-MANAGER (see how CLX backend does that), and specialize the method GENERATE-FRAME-PANES to do the right thing for your backend.
Dev Note: The McCLIM-Coca should be able to load like:
git clone --branch backend-coca https://codeberg.org/li-yiyang/McCLIM.git
;; due to Cocoa limits, GUI thread (NSApp run) will replace the main thread sbcl --eval "(ql:quickload '(:clim-listener :mcclim-coca))" \ --eval "(bt:make-thread (lambda () (setf clim:*default-server-path* :coca) (clim-listener:run-listener)))"
;; ECL could also load, but breaks down frequently
Why not old beagle backend: I wrote a little ObjC bridge to replace CCL's objc bridge. (Backends/coca/objc) The API (lockFocus) is outdated and cannot work on my computer. So I use CGBitmapContext to replace. I don't have much ObjC Cocoa programming experience so not sure if the ObjC code is correct. I have to ask AI to generate ObjC code and rewrite their logic into lisp code. (Hopefully this would be blamed)
Please don't. While the discussion is still open[1], it is doubtful that I will review and merge AI generated code. I don't have the kind of energy to review such things, even if we put aside moral principles and legal exposure for merging something with uncertain status (copyright-wise). [1] https://codeberg.org/McCLIM/McCLIM/issues/1497
Thanks for your time reading this.
凉凉, Yiyang Li, thebigbigwordl@qq.com
Best regards, Daniel