|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TKMACINT |
|
|
#define _TKMACINT |
|
|
|
|
|
#ifndef _TKINT |
|
|
#include "tkInt.h" |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TKMAC |
|
|
#include "tkMacOSX.h" |
|
|
#import <Cocoa/Cocoa.h> |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TKMACPRIV |
|
|
# ifndef CGGEOMETRY_H_ |
|
|
# ifndef CGFLOAT_DEFINED |
|
|
# if __LP64__ |
|
|
# define CGFloat double |
|
|
# else |
|
|
# define CGFloat float |
|
|
# endif |
|
|
# endif |
|
|
# define CGSize struct {CGFloat width; CGFloat height;} |
|
|
# endif |
|
|
# ifndef CGCONTEXT_H_ |
|
|
# define CGContextRef void * |
|
|
# endif |
|
|
# ifndef CGCOLOR_H_ |
|
|
# define CGColorRef void * |
|
|
# endif |
|
|
# ifndef __HISHAPE__ |
|
|
# define HIShapeRef void * |
|
|
# endif |
|
|
# ifndef _APPKITDEFINES_H |
|
|
# define NSView void * |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
struct TkWindowPrivate { |
|
|
TkWindow *winPtr; |
|
|
NSView *view; |
|
|
CGContextRef context; |
|
|
int xOff; |
|
|
int yOff; |
|
|
CGSize size; |
|
|
HIShapeRef visRgn; |
|
|
HIShapeRef aboveVisRgn; |
|
|
HIShapeRef drawRgn; |
|
|
int referenceCount; |
|
|
|
|
|
struct TkWindowPrivate *toplevel; |
|
|
|
|
|
CGFloat fillRGBA[4]; |
|
|
int flags; |
|
|
}; |
|
|
typedef struct TkWindowPrivate MacDrawable; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TK_SCROLLBAR_GROW 0x01 |
|
|
#define TK_CLIP_INVALID 0x02 |
|
|
#define TK_HOST_EXISTS 0x04 |
|
|
#define TK_DRAWN_UNDER_MENU 0x08 |
|
|
#define TK_IS_PIXMAP 0x10 |
|
|
#define TK_IS_BW_PIXMAP 0x20 |
|
|
#define TK_DO_NOT_DRAW 0x40 |
|
|
#define TTK_HAS_CONTRASTING_BG 0x80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
Tk_MacOSXEmbedRegisterWinProc *registerWinProc; |
|
|
Tk_MacOSXEmbedGetGrafPortProc *getPortProc; |
|
|
Tk_MacOSXEmbedMakeContainerExistProc *containerExistProc; |
|
|
Tk_MacOSXEmbedGetClipProc *getClipProc; |
|
|
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc; |
|
|
} TkMacOSXEmbedHandler; |
|
|
|
|
|
MODULE_SCOPE TkMacOSXEmbedHandler *tkMacOSXEmbedHandler; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _TKMACPRIV |
|
|
# ifndef CGGEOMETRY_H_ |
|
|
# ifndef CGFLOAT_DEFINED |
|
|
# undef CGFloat |
|
|
# endif |
|
|
# undef CGSize |
|
|
# endif |
|
|
# ifndef CGCONTEXT_H_ |
|
|
# undef CGContextRef |
|
|
# endif |
|
|
# ifndef CGCOLOR_H_ |
|
|
# undef CGColorRef |
|
|
# endif |
|
|
# ifndef __HISHAPE__ |
|
|
# undef HIShapeRef |
|
|
# endif |
|
|
# ifndef _APPKITDEFINES_H |
|
|
# undef NSView |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TK_WINDOW_ONLY 0 |
|
|
#define TK_PARENT_WINDOW 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TkMacOSXHostToplevelExists(tkwin) \ |
|
|
(((TkWindow *) (tkwin))->privatePtr->toplevel->flags & TK_HOST_EXISTS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TK_LOCATION_CHANGED 1 |
|
|
#define TK_SIZE_CHANGED 2 |
|
|
#define TK_BOTH_CHANGED 3 |
|
|
#define TK_MACOSX_HANDLE_EVENT_IMMEDIATELY 1024 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TK_LAYOUT_WITH_BASE_CHUNKS 1 |
|
|
#define TK_DRAW_IN_CONTEXT 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MODULE_SCOPE void TkMacOSXDefaultStartupScript(void); |
|
|
MODULE_SCOPE void TkpClipDrawableToRect(Display *display, Drawable d, int x, |
|
|
int y, int width, int height); |
|
|
MODULE_SCOPE Bool TkTestLogDisplay(Drawable drawable); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "tkIntPlatDecls.h" |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|