Comments (3)
I'm assuming you're asking in reference to this Stack Overflow question.
This project is just some throwaway test code, and I haven't used it for anything practical. I just put this code together to see if CARemoteLayer
worked at all, to answer this other Stack Overflow question and to satisfy my own curiosity.
Sorry if you were expecting Real Authoritative Documented Answers from People Who Know What They're Doing, but this just isn't that kind of situation.
Anyway, if I had to guess, you probably want something like:
- In your local view, override the
NSResponder
method you're interested in (e.g.-mouseDown:
) - It should marshal the arguments into an XPC dictionary (perhaps using
NSCoding
to serialize objects into data) - And send the dictionary over XPC to the service.
- The service receives the dictionary, unmarshals/deserializes the contents of the message, and does the appropriate thing.
Use -[RLAppDelegate changeColor:]
as an example of how to do parts of 2 and 3. RemoteLayerDemoService_peer_event_handler()
handles step 4.
The devil's in the details, of course. I suspect it wouldn't make a lot of sense to try to forward every method in NSResponder
as-is.
Does that help at all?
from remotelayerdemo.
Yes, yes I am. I actually have used your demo previously in conjunction with TwUI
which is a layer-backed UIKit for Mac, and I did get this mostly working, but with major bugs and glitches. Previously I used raw mach ports (shudder) and a simple proxy object (reimplemented NSProxy
) to get this to work, as I was targeting 10.6 as well. Since then, I've transitioned to 10.7+, AppKit, and began investigating XPC and CARemoteLayer*
.
This post actually helps quite a bit, and I'd mark it as the answer if you'd post it on SO ;)
I'll be experimenting with this and I may fork this repo as an expanded demo!
from remotelayerdemo.
@krevis Almost five years later, the solution to this question has been implemented by Apple in ViewBridge.framework
(10.10+) and my exploration into this can be found here.
from remotelayerdemo.
Related Issues (2)
- broken on Mavericks HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remotelayerdemo.