forked from pyrite-dev/milsko
fix builds on osx 10.4
This commit is contained in:
parent
0ab497ca88
commit
728983b92c
5 changed files with 30 additions and 15 deletions
4
configure
vendored
4
configure
vendored
|
|
@ -38,7 +38,6 @@ require("./pl/utils.pl");
|
|||
|
||||
param_set("classic-theme", 0);
|
||||
param_set("stb-image", 1);
|
||||
param_set("stb-truetype", 0);
|
||||
param_set("xrender", 1);
|
||||
param_set("opengl", 0);
|
||||
param_set("vulkan", 0);
|
||||
|
|
@ -50,6 +49,9 @@ param_set("examples", 1);
|
|||
|
||||
if($target ne "Darwin") {
|
||||
param_set("freetype2", 1);
|
||||
param_set("stb-truetype", 0);
|
||||
} else {
|
||||
param_set("stb-truetype", 1);
|
||||
}
|
||||
|
||||
my %features = (
|
||||
|
|
|
|||
|
|
@ -86,18 +86,17 @@
|
|||
@end
|
||||
|
||||
@interface MilskoCocoaView : NSView {
|
||||
NSBitmapImageRep* rep;
|
||||
NSGraphicsContext* context;
|
||||
MwBool valid;
|
||||
CGColorSpaceRef space;
|
||||
CGDataProviderRef provider;
|
||||
NSRect givenRect;
|
||||
float x;
|
||||
float y;
|
||||
float width;
|
||||
float height;
|
||||
MwBool _child;
|
||||
IBOutlet NSViewController* viewController;
|
||||
NSBitmapImageRep* rep;
|
||||
NSGraphicsContext* context;
|
||||
MwBool valid;
|
||||
CGColorSpaceRef space;
|
||||
CGDataProviderRef provider;
|
||||
NSRect givenRect;
|
||||
float x;
|
||||
float y;
|
||||
float width;
|
||||
float height;
|
||||
MwBool _child;
|
||||
}
|
||||
|
||||
- (void)initRepAndContextWithWidth:(float)w Height:(float)h;
|
||||
|
|
|
|||
|
|
@ -57,17 +57,26 @@
|
|||
#define M_PI 3.14159265
|
||||
#endif
|
||||
|
||||
/* Windows */
|
||||
#if defined(_MILSKO) && defined(_WIN32)
|
||||
#define MWDECL extern __declspec(dllexport)
|
||||
#elif defined(_WIN32)
|
||||
#define MWDECL extern __declspec(dllimport)
|
||||
/* GCC/Clang */
|
||||
/* First check if we have __has_attribute and can check for the existence of visibility */
|
||||
#elif defined(__has_attribute)
|
||||
#if __has_attribute(visibility)
|
||||
#define MWDECL extern __attribute__((visibility("default")))
|
||||
#else
|
||||
#define MWDECL extern
|
||||
#endif
|
||||
/* It might be that we're on an old version of GCC (like the one Apple ships with older versions of Mac OS).
|
||||
* If we're on gcc 3 or above, assume it's there
|
||||
*/
|
||||
#elif __GNUC__ >= 3
|
||||
#define MWDECL extern __attribute__((visibility("default")))
|
||||
#else
|
||||
/* all else fails */
|
||||
#define MWDECL extern
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ sub new_object {
|
|||
my @l = glob($_[0]);
|
||||
foreach my $e (@l) {
|
||||
$e =~ s/\.(c|m)$/$object_suffix/;
|
||||
print($e."\n");
|
||||
push(@library_targets, $e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -665,6 +665,9 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
|||
NSSize sz = [self->rep size];
|
||||
MwLL ll = [((MilskoFakePointer*)[[[[self window] contentView] subviews]
|
||||
objectAtIndex:0]) pointer];
|
||||
NSRect bounds;
|
||||
NSArray* subviews = [self subviews];
|
||||
int i;
|
||||
|
||||
[super drawRect:dirtyRect];
|
||||
if(!self->rep) {
|
||||
|
|
@ -683,8 +686,9 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
|||
|
||||
[self->rep drawInRect:dirtyRect];
|
||||
|
||||
for(NSView* subview in [self subviews]) {
|
||||
NSRect bounds = [subview bounds];
|
||||
for(i = 0; i < [subviews count]; i++) {
|
||||
NSView* subview = [subviews objectAtIndex:i];
|
||||
bounds = [subview bounds];
|
||||
[subview drawRect:bounds];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue