MobileSubstrate 플러그인을 통해 iOS에서 시스템 차원의 탭 시뮬레이션을하고 싶습니다. 이 아이디어는 iOS 5.1.1에서 시스템 전체 수준에서 터치 (처음 터치 한 다음 멀티 터치)를 시뮬레이트 할 수 있도록하는 것입니다.iOS에서의 시스템 전체 탭 시뮬레이션
특정 뷰에서 접촉을 시뮬레이션하기 위해 this article을 성공적으로 구현했지만 이제는이를 시스템 전체에서 시뮬레이션 할 수 있기를 바랍니다.
개인 MobileServices 프레임 워크를 사용해야한다는 것을 알고 있으며 GSEvent에서 documented myself을 보았습니다. 또한 Veency & MouseSupport 소스 코드를 살펴 보았습니다.
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
GSEventRef eventRef = (GSEventRef)[event performSelector:@selector(_gsEvent)];
GSEventRecord record = *_GSEventGetGSEventRecord(eventRef);
< breakpoint here to look at record >
}
을하고 그 결과는 위의 자세한 조 (아이폰 OS 3) 구조 이전에 매우 유사합니다
나는 UIEvents을 가로 채고 기본 구조 살펴보기를 연결하려고 노력했다. 내가 다음 (가 아닌 MS 지금 조정할 독립 실행 형 응용 프로그램에) 해당 이벤트 자신을 해고하려 : 전혀 작동하지 않습니다 이제+(void)simulateTouchDown:(CGPoint)point{
point.x = roundf(point.x);
point.y = roundf(point.y);
GSEventRecord record;
memset(&record, 0, sizeof(record));
record.type = kGSEventHand;
record.windowLocation = point;
record.timestamp = GSCurrentEventTimestamp();
GSSendSystemEvent(&record);
}
을, (충돌하거나하지 않습니다) .
대부분의 코드 (MouseSupport, Veency는) 만이
// Create & populate a GSEvent
struct {
struct GSEventRecord record;
struct {
struct GSEventRecordInfo info;
struct GSPathInfo path;
} data;
} event;
memset(&event, 0, sizeof(event));
event.record.type = kGSEventHand;
event.record.windowLocation = point;
event.record.timestamp = GSCurrentEventTimestamp();
event.record.infoSize = sizeof(event.data);
event.data.info.handInfo.type = kGSHandInfoTypeTouchDown;
event.data.info.handInfo._0x44 = 0x1;
event.data.info.handInfo._0x48 = 0x1;
event.data.info.pathPositions = 1;
event.data.path.pathIndex = 0x01;
event.data.path.pathIdentity = 0x02;
event.data.path.pathProximity = 0x00;
event.data.path.pathLocation = event.record.windowLocation;
GSSendSystemEvent(&event.record);
같이 :
- GSEventRecordInfo 알 수없는 (그리고 나는 그것이 정의 할 수있는 위치를 찾을 수 없습니다)
- I 돈 전체 이벤트가 레코드를 전달하는 지점을 확인하지 못합니다.
이 일을 통해 iOS 5 가이드.
왜 탈옥 했습니까? – bmargulies
무엇을 의미합니까? 시스템 전체의 이벤트를 어떻게 시뮬레이트 할 것입니까? – Olotiar
GSEventRecordInfo [here] (http://gitweb.saurik.com/iphone-api.git/blob/0ec5695fb65e628e298935de594682090a637b35:/GraphicsServices/GSEvent.h)에 대한 정의를 찾을 수 있습니다. – boxel