mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-27 22:10:23 +00:00
ba12e65f5a
Also, drop unused NSOpenGLDrawable_X11, O2Context_cairo and O2Surface_cairo.
43 lines
972 B
Objective-C
43 lines
972 B
Objective-C
//
|
|
// X11Display.h
|
|
// AppKit
|
|
//
|
|
// Created by Johannes Fortmann on 13.10.08.
|
|
// Copyright 2008 -. All rights reserved.
|
|
//
|
|
|
|
#import <AppKit/NSDisplay.h>
|
|
#import <X11/Xlib.h>
|
|
|
|
#ifdef DARLING
|
|
#import <CoreFoundation/CFRunLoop.h>
|
|
#import <CoreFoundation/CFSocket.h>
|
|
#endif
|
|
|
|
@interface X11Display : NSDisplay {
|
|
Display *_display;
|
|
int _fileDescriptor;
|
|
#ifndef DARLING
|
|
NSSelectInputSource *_inputSource;
|
|
#else
|
|
// We use CFRunLoop directly, without going through any Foundation wrapper,
|
|
// because Apple's Cocoa has none. Unlike Apple's Cocoa, we need to watch
|
|
// over a Unix domain socket, not a Mach port.
|
|
CFSocketRef _cfSocket;
|
|
CFRunLoopSourceRef _source;
|
|
#endif
|
|
NSMutableDictionary *_windowsByID;
|
|
|
|
id lastFocusedWindow;
|
|
NSTimeInterval lastClickTimeStamp;
|
|
int clickCount;
|
|
}
|
|
|
|
- (Display *)display;
|
|
|
|
- (void)setWindow:(id)window forID:(XID)i;
|
|
|
|
- (CGFloat)doubleClickInterval;
|
|
- (int)handleError:(XErrorEvent *)errorEvent;
|
|
@end
|