Further simplification following new minimum supported macOS version: 10.7 - cont'd
This commit is contained in:
parent
db18699e95
commit
1be412ab69
@ -124,7 +124,7 @@ static NSMutableArray *dropped_files_list = nil; // list of files dropped at app
|
|||||||
typedef void (*open_cb_f_type)(const char *);
|
typedef void (*open_cb_f_type)(const char *);
|
||||||
static Fl_Window *starting_moved_window = NULL; // the moved window which brings its subwins with it
|
static Fl_Window *starting_moved_window = NULL; // the moved window which brings its subwins with it
|
||||||
|
|
||||||
enum { FLTKTimerEvent = 1, FLTKDataReadyEvent };
|
enum { FLTKBreakLoopEvent = 1, FLTKDataReadyEvent };
|
||||||
|
|
||||||
// Carbon functions and definitions
|
// Carbon functions and definitions
|
||||||
|
|
||||||
@ -134,9 +134,6 @@ extern "C" enum {
|
|||||||
kTSMDocumentEnabledInputSourcesPropertyTag = 'enis' // from Carbon/TextServices.h
|
kTSMDocumentEnabledInputSourcesPropertyTag = 'enis' // from Carbon/TextServices.h
|
||||||
};
|
};
|
||||||
|
|
||||||
// Undocumented voodoo. Taken from Mozilla.
|
|
||||||
static const int smEnableRomanKybdsOnly = -23;
|
|
||||||
|
|
||||||
typedef TSMDocumentID (*TSMGetActiveDocument_type)(void);
|
typedef TSMDocumentID (*TSMGetActiveDocument_type)(void);
|
||||||
static TSMGetActiveDocument_type TSMGetActiveDocument;
|
static TSMGetActiveDocument_type TSMGetActiveDocument;
|
||||||
typedef OSStatus (*TSMSetDocumentProperty_type)(TSMDocumentID, OSType, UInt32, void*);
|
typedef OSStatus (*TSMSetDocumentProperty_type)(TSMDocumentID, OSType, UInt32, void*);
|
||||||
@ -149,7 +146,6 @@ static CFStringRef kTISTypeKeyboardLayout;
|
|||||||
static CFStringRef kTISPropertyInputSourceType;
|
static CFStringRef kTISPropertyInputSourceType;
|
||||||
|
|
||||||
typedef void (*KeyScript_type)(short);
|
typedef void (*KeyScript_type)(short);
|
||||||
static KeyScript_type KeyScript;
|
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
||||||
const NSInteger NSControlStateValueOn = NSOnState;
|
const NSInteger NSControlStateValueOn = NSOnState;
|
||||||
@ -533,7 +529,7 @@ void Fl_Cocoa_Screen_Driver::breakMacEventLoop()
|
|||||||
location:NSMakePoint(0,0)
|
location:NSMakePoint(0,0)
|
||||||
modifierFlags:0 timestamp:0
|
modifierFlags:0 timestamp:0
|
||||||
windowNumber:0 context:NULL
|
windowNumber:0 context:NULL
|
||||||
subtype:FLTKTimerEvent
|
subtype:FLTKBreakLoopEvent
|
||||||
data1:0
|
data1:0
|
||||||
data2:0];
|
data2:0];
|
||||||
[NSApp postEvent:event atStart:NO];
|
[NSApp postEvent:event atStart:NO];
|
||||||
@ -1201,23 +1197,6 @@ static FLTextView *fltextview_instance = nil;
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
/* make subwindows re-appear after appl unhide or window deminiaturize
|
|
||||||
(not necessary with 10.5 and above)
|
|
||||||
*/
|
|
||||||
static void orderfront_subwindows(FLWindow *xid)
|
|
||||||
{
|
|
||||||
NSArray *children = [xid childWindows]; // 10.2
|
|
||||||
NSEnumerator *enumerator = [children objectEnumerator];
|
|
||||||
id child;
|
|
||||||
while ((child = [enumerator nextObject]) != nil) { // this undo-redo seems necessary under 10.3
|
|
||||||
[xid removeChildWindow:child];
|
|
||||||
[xid addChildWindow:child ordered:NSWindowAbove];
|
|
||||||
[child orderWindow:NSWindowAbove relativeTo:[xid windowNumber]];
|
|
||||||
orderfront_subwindows(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// compute coordinates of the win top left in FLTK units
|
// compute coordinates of the win top left in FLTK units
|
||||||
static void CocoatoFLTK(Fl_Window *win, int &x, int &y) {
|
static void CocoatoFLTK(Fl_Window *win, int &x, int &y) {
|
||||||
NSPoint ori;
|
NSPoint ori;
|
||||||
@ -4462,11 +4441,6 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep_subwins(Fl_Window *win, int x,
|
|||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nsbitmapProviderReleaseData (void *info, const void *data, size_t size)
|
|
||||||
{
|
|
||||||
[(NSBitmapImageRep*)info release];
|
|
||||||
}
|
|
||||||
|
|
||||||
CGImageRef Fl_Cocoa_Window_Driver::CGImage_from_window_rect(int x, int y, int w, int h, bool capture_subwins)
|
CGImageRef Fl_Cocoa_Window_Driver::CGImage_from_window_rect(int x, int y, int w, int h, bool capture_subwins)
|
||||||
{
|
{
|
||||||
/* Returns a capture of a rectangle of a mapped window as a CGImage.
|
/* Returns a capture of a rectangle of a mapped window as a CGImage.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user