Import Tk 8.6.10
This commit is contained in:
@@ -137,8 +137,6 @@ typedef struct TkMacOSXDrawingContext {
|
||||
* Variables internal to TkAqua.
|
||||
*/
|
||||
|
||||
MODULE_SCOPE CGFloat tkMacOSXZeroScreenHeight;
|
||||
MODULE_SCOPE CGFloat tkMacOSXZeroScreenTop;
|
||||
MODULE_SCOPE long tkMacOSXMacOSXVersion;
|
||||
|
||||
/*
|
||||
@@ -177,6 +175,8 @@ MODULE_SCOPE OSStatus TkMacOSHIShapeUnion(HIShapeRef inShape1,
|
||||
MODULE_SCOPE void * TkMacOSXGetNamedSymbol(const char *module,
|
||||
const char *symbol);
|
||||
MODULE_SCOPE void TkMacOSXDisplayChanged(Display *display);
|
||||
MODULE_SCOPE CGFloat TkMacOSXZeroScreenHeight();
|
||||
MODULE_SCOPE CGFloat TkMacOSXZeroScreenTop();
|
||||
MODULE_SCOPE int TkMacOSXUseAntialiasedText(Tcl_Interp *interp,
|
||||
int enable);
|
||||
MODULE_SCOPE int TkMacOSXInitCGDrawing(Tcl_Interp *interp, int enable,
|
||||
@@ -233,6 +233,16 @@ MODULE_SCOPE int TkMacOSXStandardAboutPanelObjCmd(ClientData clientData,
|
||||
MODULE_SCOPE int TkMacOSXIconBitmapObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE void TkMacOSXDrawSolidBorder(Tk_Window tkwin, GC gc,
|
||||
int inset, int thickness);
|
||||
MODULE_SCOPE int TkMacOSXServices_Init(Tcl_Interp *interp);
|
||||
MODULE_SCOPE int TkMacOSXRegisterServiceWidgetObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE NSString* TclUniToNSString(const char *source, int numBytes);
|
||||
MODULE_SCOPE int TclUniAtIndex(NSString *string, int index, char *uni,
|
||||
unsigned int *code);
|
||||
MODULE_SCOPE char* NSStringToTclUni(NSString *string, int *numBytes);
|
||||
|
||||
#pragma mark Private Objective-C Classes
|
||||
|
||||
@@ -250,28 +260,29 @@ VISIBILITY_HIDDEN
|
||||
- (BOOL)isSpecial:(NSUInteger)special;
|
||||
@end
|
||||
|
||||
@interface TKMenu(TKMenuDelegate) <NSMenuDelegate>
|
||||
@end
|
||||
|
||||
VISIBILITY_HIDDEN
|
||||
@interface TKApplication : NSApplication {
|
||||
@private
|
||||
Tcl_Interp *_eventInterp;
|
||||
NSMenu *_servicesMenu;
|
||||
TKMenu *_defaultMainMenu, *_defaultApplicationMenu;
|
||||
NSMenuItem *_demoMenuItem;
|
||||
NSArray *_defaultApplicationMenuItems, *_defaultWindowsMenuItems;
|
||||
NSArray *_defaultHelpMenuItems;
|
||||
NSWindow *_windowWithMouse;
|
||||
NSArray *_defaultHelpMenuItems, *_defaultFileMenuItems;
|
||||
NSAutoreleasePool *_mainPool;
|
||||
#ifdef __i386__
|
||||
/* The Objective C runtime used on i386 requires this. */
|
||||
int _poolLock;
|
||||
int _macMinorVersion;
|
||||
Bool _isDrawing;
|
||||
Bool _simulateDrawing;
|
||||
#endif
|
||||
}
|
||||
@property int poolLock;
|
||||
@property int macMinorVersion;
|
||||
@property Bool isDrawing;
|
||||
@property Bool simulateDrawing;
|
||||
|
||||
@end
|
||||
@interface TKApplication(TKInit)
|
||||
@@ -280,6 +291,24 @@ VISIBILITY_HIDDEN
|
||||
- (void)_lockAutoreleasePool;
|
||||
- (void)_unlockAutoreleasePool;
|
||||
@end
|
||||
@interface TKApplication(TKKeyboard)
|
||||
- (void) keyboardChanged: (NSNotification *) notification;
|
||||
@end
|
||||
@interface TKApplication(TKWindowEvent) <NSApplicationDelegate>
|
||||
- (void) _setupWindowNotifications;
|
||||
@end
|
||||
@interface TKApplication(TKDialog) <NSOpenSavePanelDelegate>
|
||||
@end
|
||||
@interface TKApplication(TKMenu)
|
||||
- (void)tkSetMainMenu:(TKMenu *)menu;
|
||||
@end
|
||||
@interface TKApplication(TKMenus)
|
||||
- (void) _setupMenus;
|
||||
@end
|
||||
@interface NSApplication(TKNotify)
|
||||
/* We need to declare this hidden method. */
|
||||
- (void) _modalSession: (NSModalSession) session sendEvent: (NSEvent *) event;
|
||||
@end
|
||||
@interface TKApplication(TKEvent)
|
||||
- (NSEvent *)tkProcessEvent:(NSEvent *)theEvent;
|
||||
@end
|
||||
@@ -289,9 +318,6 @@ VISIBILITY_HIDDEN
|
||||
@interface TKApplication(TKKeyEvent)
|
||||
- (NSEvent *)tkProcessKeyEvent:(NSEvent *)theEvent;
|
||||
@end
|
||||
@interface TKApplication(TKMenu)
|
||||
- (void)tkSetMainMenu:(TKMenu *)menu;
|
||||
@end
|
||||
@interface TKApplication(TKClipboard)
|
||||
- (void)tkProvidePasteboard:(TkDisplay *)dispPtr;
|
||||
- (void)tkCheckPasteboard;
|
||||
@@ -313,18 +339,23 @@ VISIBILITY_HIDDEN
|
||||
withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
|
||||
- (void) handleDoScriptEvent: (NSAppleEventDescriptor *)event
|
||||
withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
|
||||
- (void)handleURLEvent: (NSAppleEventDescriptor*)event
|
||||
withReplyEvent: (NSAppleEventDescriptor*)replyEvent;
|
||||
@end
|
||||
|
||||
VISIBILITY_HIDDEN
|
||||
@interface TKContentView : NSView <NSTextInput> {
|
||||
/*
|
||||
* Subclass TKContentView from NSTextInputClient to enable composition and
|
||||
* input from the Character Palette.
|
||||
*/
|
||||
|
||||
@interface TKContentView : NSView <NSTextInputClient>
|
||||
{
|
||||
@private
|
||||
/*Remove private API calls.*/
|
||||
#if 0
|
||||
id _savedSubviews;
|
||||
BOOL _subviewsSetAside;
|
||||
#endif
|
||||
NSString *privateWorkingText;
|
||||
Bool _needsRedisplay;
|
||||
}
|
||||
@property Bool needsRedisplay;
|
||||
@end
|
||||
|
||||
@interface TKContentView(TKKeyEvent)
|
||||
@@ -332,22 +363,27 @@ VISIBILITY_HIDDEN
|
||||
@end
|
||||
|
||||
@interface TKContentView(TKWindowEvent)
|
||||
- (void) drawRect: (NSRect) rect;
|
||||
- (void) generateExposeEvents: (HIShapeRef) shape;
|
||||
- (void) generateExposeEvents: (HIShapeRef) shape;
|
||||
- (void) tkToolbarButton: (id) sender;
|
||||
- (BOOL) isOpaque;
|
||||
- (BOOL) wantsDefaultClipping;
|
||||
- (BOOL) acceptsFirstResponder;
|
||||
- (void) keyDown: (NSEvent *) theEvent;
|
||||
@end
|
||||
|
||||
@interface NSWindow(TKWm)
|
||||
- (NSPoint) tkConvertPointToScreen:(NSPoint)point;
|
||||
- (NSPoint) tkConvertPointFromScreen:(NSPoint)point;
|
||||
@end
|
||||
|
||||
VISIBILITY_HIDDEN
|
||||
@interface TKWindow : NSWindow
|
||||
@end
|
||||
|
||||
@interface NSWindow(TKWm)
|
||||
- (NSPoint) tkConvertPointToScreen:(NSPoint)point;
|
||||
- (NSPoint) tkConvertPointFromScreen:(NSPoint)point;
|
||||
@interface TKWindow(TKWm)
|
||||
- (void) tkLayoutChanged;
|
||||
@end
|
||||
|
||||
@interface NSDrawerWindow : NSWindow
|
||||
{
|
||||
id _i1, _i2;
|
||||
}
|
||||
@end
|
||||
|
||||
#pragma mark NSMenu & NSMenuItem Utilities
|
||||
@@ -378,4 +414,34 @@ VISIBILITY_HIDDEN
|
||||
keyEquivalentModifierMask:(NSUInteger)keyEquivalentModifierMask;
|
||||
@end
|
||||
|
||||
@interface NSColorPanel(TKDialog)
|
||||
- (void) _setUseModalAppearance: (BOOL) flag;
|
||||
@end
|
||||
|
||||
@interface NSFont(TKFont)
|
||||
- (NSFont *) bestMatchingFontForCharacters: (const UTF16Char *) characters
|
||||
length: (NSUInteger) length attributes: (NSDictionary *) attributes
|
||||
actualCoveredLength: (NSUInteger *) coveredLength;
|
||||
@end
|
||||
|
||||
/*
|
||||
* This method of NSApplication is not declared in NSApplication.h so we
|
||||
* declare it here to be a method of the TKMenu category.
|
||||
*/
|
||||
|
||||
@interface NSApplication(TKMenu)
|
||||
- (void) setAppleMenu: (NSMenu *) menu;
|
||||
@end
|
||||
|
||||
#endif /* _TKMACPRIV */
|
||||
|
||||
int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]);
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: objc
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 79
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user