Migrated newContext(), freeContext(), and colorButtonInhibitSendAction().
This commit is contained in:
parent
323a8945eb
commit
cc271ccc37
|
@ -1,15 +1,3 @@
|
|||
// draw.m
|
||||
extern uiDrawContext *newContext(CGContextRef, CGFloat);
|
||||
extern void freeContext(uiDrawContext *);
|
||||
|
||||
// fontbutton.m
|
||||
extern BOOL uiprivFontButtonInhibitSendAction(SEL sel, id from, id to);
|
||||
extern BOOL uiprivFontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override);
|
||||
extern void uiprivSetupFontPanel(void);
|
||||
|
||||
// colorbutton.m
|
||||
extern BOOL colorButtonInhibitSendAction(SEL sel, id from, id to);
|
||||
|
||||
// scrollview.m
|
||||
struct scrollViewCreateParams {
|
||||
NSView *DocumentView;
|
||||
|
|
|
@ -57,7 +57,7 @@ struct uiArea {
|
|||
|
||||
c = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
|
||||
// see draw.m under text for why we need the height
|
||||
dp.Context = newContext(c, [self bounds].size.height);
|
||||
dp.Context = uiprivDrawNewContext(c, [self bounds].size.height);
|
||||
|
||||
dp.AreaWidth = 0;
|
||||
dp.AreaHeight = 0;
|
||||
|
@ -74,7 +74,7 @@ struct uiArea {
|
|||
// no need to save or restore the graphics state to reset transformations; Cocoa creates a brand-new context each time
|
||||
(*(a->ah->Draw))(a->ah, a, &dp);
|
||||
|
||||
freeContext(dp.Context);
|
||||
uiprivDrawFreeContext(dp.Context);
|
||||
}
|
||||
|
||||
- (BOOL)isFlipped
|
||||
|
|
|
@ -117,7 +117,7 @@ uiDarwinControlAllDefaults(uiColorButton, button)
|
|||
|
||||
// we do not want color change events to be sent to any controls other than the color buttons
|
||||
// see main.m for more details
|
||||
BOOL colorButtonInhibitSendAction(SEL sel, id from, id to)
|
||||
BOOL uiprivColorButtonInhibitSendAction(SEL sel, id from, id to)
|
||||
{
|
||||
if (sel != @selector(changeColor:))
|
||||
return NO;
|
||||
|
|
|
@ -104,7 +104,7 @@ void uiDrawPathEnd(uiDrawPath *p)
|
|||
p->ended = TRUE;
|
||||
}
|
||||
|
||||
uiDrawContext *newContext(CGContextRef ctxt, CGFloat height)
|
||||
uiDrawContext *uiprivDrawNewContext(CGContextRef ctxt, CGFloat height)
|
||||
{
|
||||
uiDrawContext *c;
|
||||
|
||||
|
@ -114,7 +114,7 @@ uiDrawContext *newContext(CGContextRef ctxt, CGFloat height)
|
|||
return c;
|
||||
}
|
||||
|
||||
void freeContext(uiDrawContext *c)
|
||||
void uiprivDrawFreeContext(uiDrawContext *c)
|
||||
{
|
||||
uiprivFree(c);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ static BOOL stepsIsRunning;
|
|||
// it turns out NSFontManager also sends changeFont: through this; let's inhibit that here too (see fontbutton.m)
|
||||
- (BOOL)sendAction:(SEL)sel to:(id)to from:(id)from
|
||||
{
|
||||
if (colorButtonInhibitSendAction(sel, from, to))
|
||||
if (uiprivColorButtonInhibitSendAction(sel, from, to))
|
||||
return NO;
|
||||
if (uiprivFontButtonInhibitSendAction(sel, from, to))
|
||||
return NO;
|
||||
|
|
|
@ -110,4 +110,16 @@ extern int uiprivSendAreaEvents(NSEvent *);
|
|||
extern BOOL uiprivFromKeycode(unsigned short keycode, uiAreaKeyEvent *ke);
|
||||
extern BOOL uiprivKeycodeModifier(unsigned short keycode, uiModifiers *mod);
|
||||
|
||||
// draw.m
|
||||
extern uiDrawContext *uiprivDrawNewContext(CGContextRef, CGFloat);
|
||||
extern void uiprivDrawFreeContext(uiDrawContext *);
|
||||
|
||||
// fontbutton.m
|
||||
extern BOOL uiprivFontButtonInhibitSendAction(SEL sel, id from, id to);
|
||||
extern BOOL uiprivFontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override);
|
||||
extern void uiprivSetupFontPanel(void);
|
||||
|
||||
// colorbutton.m
|
||||
extern BOOL uiprivColorButtonInhibitSendAction(SEL sel, id from, id to);
|
||||
|
||||
#import "OLD_uipriv_darwin.h"
|
||||
|
|
Loading…
Reference in New Issue