Feature to drag a file from Windows to Mac:

- On Mac client main thread is used for cocoa application in order to simulate drag.
- Send dragging file dir from Windows server to Mac client while dragging after switching screen.
- Dragging information sending is immature now (need to support multi files dragging in the future).
- Used Cocoa function to monitor dragg pasteboard.
- Changed Mac client to use another thread for event queue instead of the main thread.
- Change fileRecieveComplete to fileRecieveCompleted.
This commit is contained in:
jerry 2013-08-30 14:38:43 +00:00
parent 031a84ca84
commit ce1b62db14
52 changed files with 875 additions and 184 deletions

View file

@ -79,7 +79,7 @@ public:
// ISecondaryScreen overrides
virtual void fakeMouseButton(ButtonID id, bool press);
virtual void fakeMouseMove(SInt32 x, SInt32 y) const;
virtual void fakeMouseMove(SInt32 x, SInt32 y);
virtual void fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const;
virtual void fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const;
@ -98,6 +98,10 @@ public:
virtual void setSequenceNumber(UInt32);
virtual bool isPrimary() const;
virtual void fakeDraggingFiles(CString str);
const CString& getDropTarget() const { return m_dropTarget; }
protected:
// IPlatformScreen overrides
virtual void handleSystemEvent(const CEvent&, void*);
@ -191,10 +195,16 @@ private:
CGEventType type,
CGEventRef event,
void* refcon);
static CGEventRef handleCGInputEventSecondary(CGEventTapProxy proxy,
CGEventType type,
CGEventRef event,
void* refcon);
static CGEventRef handleCGInputEventSecondary(CGEventTapProxy proxy,
CGEventType type,
CGEventRef event,
void* refcon);
// convert CFString to char*
static char* CFStringRefToUTF8String(CFStringRef aString);
void getDropTargetThread(void*);
private:
struct CHotKeyItem {
public:
@ -334,6 +344,10 @@ private:
bool m_autoShowHideCursor;
IEventQueue* m_events;
bool m_fakeDraggingStarted;
CThread* m_getDropTargetThread;
CString m_dropTarget;
};
#endif