comparison mac/dw.m @ 1949:c71e5da5b801

Mac: Fix mojave #ifdefs so it builds pre-mojave.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 06 Jul 2019 18:57:29 +0000
parents bbb1fb54f321
children bb4eaf02cdaf
comparison
equal deleted inserted replaced
1948:bbb1fb54f321 1949:c71e5da5b801
605 NSFont *DWDefaultFont; 605 NSFont *DWDefaultFont;
606 DWTimerHandler *DWHandler; 606 DWTimerHandler *DWHandler;
607 #if !defined(GARBAGE_COLLECT) 607 #if !defined(GARBAGE_COLLECT)
608 NSAutoreleasePool *pool; 608 NSAutoreleasePool *pool;
609 #endif 609 #endif
610 #ifndef BUILDING_FOR_MOJAVE
610 HWND _DWLastDrawable; 611 HWND _DWLastDrawable;
612 #endif
611 HMTX DWRunMutex; 613 HMTX DWRunMutex;
612 HMTX DWThreadMutex; 614 HMTX DWThreadMutex;
613 HMTX DWThreadMutex2; 615 HMTX DWThreadMutex2;
614 DWTID DWThread = (DWTID)-1; 616 DWTID DWThread = (DWTID)-1;
615 DWTID _dw_mutex_locked = (DWTID)-1; 617 DWTID _dw_mutex_locked = (DWTID)-1;
862 -(void)setUserdata:(void *)input { userdata = input; } 864 -(void)setUserdata:(void *)input { userdata = input; }
863 -(void)setFont:(NSFont *)input { [font release]; font = input; [font retain]; } 865 -(void)setFont:(NSFont *)input { [font release]; font = input; [font retain]; }
864 -(NSFont *)font { return font; } 866 -(NSFont *)font { return font; }
865 -(void)setSize:(NSSize)input { 867 -(void)setSize:(NSSize)input {
866 size = input; 868 size = input;
869 #ifdef BUILDING_FOR_MOJAVE
867 if(cachedDrawingRep) 870 if(cachedDrawingRep)
868 { 871 {
869 NSBitmapImageRep *oldrep = cachedDrawingRep; 872 NSBitmapImageRep *oldrep = cachedDrawingRep;
870 cachedDrawingRep = [self bitmapImageRepForCachingDisplayInRect:self.bounds]; 873 cachedDrawingRep = [self bitmapImageRepForCachingDisplayInRect:self.bounds];
871 [cachedDrawingRep retain]; 874 [cachedDrawingRep retain];
872 [oldrep release]; 875 [oldrep release];
873 } 876 }
877 #endif
874 } 878 }
875 -(NSSize)size { return size; } 879 -(NSSize)size { return size; }
876 #ifdef BUILDING_FOR_MOJAVE 880 #ifdef BUILDING_FOR_MOJAVE
877 -(NSBitmapImageRep *)cachedDrawingRep { 881 -(NSBitmapImageRep *)cachedDrawingRep {
878 if(!cachedDrawingRep) 882 if(!cachedDrawingRep)