Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
deprecated-irrlicht-mac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
deprecated-irrlicht-mac
Commits
f758fb54
Commit
f758fb54
authored
Mar 25, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch files
parent
d0d04c32
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3941 additions
and
3843 deletions
+3941
-3843
source/Irrlicht/CGUIEditBox.cpp
source/Irrlicht/CGUIEditBox.cpp
+1568
-1564
source/Irrlicht/MacOSX/AppDelegate.h
source/Irrlicht/MacOSX/AppDelegate.h
+24
-24
source/Irrlicht/MacOSX/AppDelegate.mm
source/Irrlicht/MacOSX/AppDelegate.mm
+103
-79
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
+253
-251
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
+1957
-1889
source/Irrlicht/MacOSX/OSXClipboard.mm
source/Irrlicht/MacOSX/OSXClipboard.mm
+36
-36
No files found.
source/Irrlicht/CGUIEditBox.cpp
View file @
f758fb54
This diff is collapsed.
Click to expand it.
source/Irrlicht/MacOSX/AppDelegate.h
View file @
f758fb54
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
#import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h"
@interface
AppDelegate
:
NS
Object
{
BOOL
_quit
;
irr
::
CIrrDeviceMacOSX
*
_device
;
}
-
(
id
)
initWithDevice
:(
irr
::
CIrrDeviceMacOSX
*
)
device
;
-
(
BOOL
)
isQuit
;
@end
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
#import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h"
@interface
AppDelegate
:
NS
TextView
<
NSApplicationDelegate
>
{
BOOL
_quit
;
irr
::
CIrrDeviceMacOSX
*
_device
;
}
-
(
id
)
initWithDevice
:(
irr
::
CIrrDeviceMacOSX
*
)
device
;
-
(
BOOL
)
isQuit
;
@end
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_
source/Irrlicht/MacOSX/AppDelegate.mm
View file @
f758fb54
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import "AppDelegate.h"
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
@implementation
AppDelegate
-
(
id
)
initWithDevice
:(
irr
::
CIrrDeviceMacOSX
*
)
device
{
self
=
[
super
init
];
if
(
self
)
_device
=
device
;
return
(
self
);
}
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
{
_quit
=
FALSE
;
}
-
(
void
)
orderFrontStandardAboutPanel
:(
id
)
sender
{
[
NSApp
orderFrontStandardAboutPanel
:
sender
];
}
-
(
void
)
unhideAllApplications
:(
id
)
sender
{
[
NSApp
unhideAllApplications
:
sender
];
}
-
(
void
)
hide
:(
id
)
sender
{
[
NSApp
hide
:
sender
];
}
-
(
void
)
hideOtherApplications
:(
id
)
sender
{
[
NSApp
hideOtherApplications
:
sender
];
}
-
(
void
)
terminate
:(
id
)
sender
{
_quit
=
TRUE
;
}
-
(
void
)
windowWillClose
:(
id
)
sender
{
_quit
=
TRUE
;
}
-
(
NSSize
)
windowWillResize
:(
NSWindow
*
)
window
toSize
:(
NSSize
)
proposedFrameSize
{
if
(
_device
->
isResizable
())
return
proposedFrameSize
;
else
return
[
window
frame
].
size
;
}
-
(
void
)
windowDidResize
:(
NSNotification
*
)
aNotification
{
NSWindow
*
window
;
NSRect
frame
;
window
=
[
aNotification
object
];
frame
=
[
window
frame
];
_device
->
setResize
((
int
)
frame
.
size
.
width
,(
int
)
frame
.
size
.
height
);
}
-
(
BOOL
)
isQuit
{
return
(
_quit
);
}
@end
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import "AppDelegate.h"
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
@implementation
AppDelegate
-
(
id
)
initWithDevice
:(
irr
::
CIrrDeviceMacOSX
*
)
device
{
self
=
[
super
init
];
if
(
self
)
_device
=
device
;
return
(
self
);
}
-
(
void
)
applicationDidFinishLaunching
:(
NSNotification
*
)
aNotification
{
_quit
=
FALSE
;
}
-
(
void
)
orderFrontStandardAboutPanel
:(
id
)
sender
{
[
NSApp
orderFrontStandardAboutPanel
:
sender
];
}
-
(
void
)
unhideAllApplications
:(
id
)
sender
{
[
NSApp
unhideAllApplications
:
sender
];
}
-
(
void
)
hide
:(
id
)
sender
{
[
NSApp
hide
:
sender
];
}
-
(
void
)
hideOtherApplications
:(
id
)
sender
{
[
NSApp
hideOtherApplications
:
sender
];
}
-
(
void
)
terminate
:(
id
)
sender
{
_quit
=
TRUE
;
}
-
(
void
)
windowWillClose
:(
id
)
sender
{
_quit
=
TRUE
;
}
-
(
NSSize
)
windowWillResize
:(
NSWindow
*
)
window
toSize
:(
NSSize
)
proposedFrameSize
{
if
(
_device
->
isResizable
())
return
proposedFrameSize
;
else
return
[
window
frame
].
size
;
}
-
(
void
)
windowDidResize
:(
NSNotification
*
)
aNotification
{
NSWindow
*
window
;
NSRect
frame
;
window
=
[
aNotification
object
];
frame
=
[
window
frame
];
_device
->
setResize
((
int
)
frame
.
size
.
width
,(
int
)
frame
.
size
.
height
);
}
-
(
BOOL
)
isQuit
{
return
(
_quit
);
}
-
(
void
)
keyDown
:(
NSEvent
*
)
event
{
[
self
interpretKeyEvents
:@[
event
]];
}
-
(
void
)
insertText
:(
id
)
string
{
[
self
setString
:
@""
];
if
([
string
isKindOfClass
:[
NSAttributedString
class
]])
{
_device
->
handleInputEvent
([[
string
string
]
UTF8String
]);
}
else
{
_device
->
handleInputEvent
([
string
UTF8String
]);
}
}
-
(
void
)
doCommandBySelector
:(
SEL
)
selector
{
_device
->
processKeyEvent
();
}
@end
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
View file @
f758fb54
This diff is collapsed.
Click to expand it.
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
View file @
f758fb54
This diff is collapsed.
Click to expand it.
source/Irrlicht/MacOSX/OSXClipboard.mm
View file @
f758fb54
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "OSXClipboard.h"
#import <Cocoa/Cocoa.h>
void
OSXCopyToClipboard
(
const
char
*
text
)
{
NSString
*
str
;
NSPasteboard
*
board
;
if
((
text
!=
NULL
)
&&
(
strlen
(
text
)
>
0
))
{
str
=
[
NSString
stringWith
CString
:
text
encoding
:
NSWindowsCP1252StringEncoding
];
board
=
[
NSPasteboard
generalPasteboard
];
[
board
declareTypes
:[
NSArray
arrayWithObject
:
NSStringPboardType
]
owner
:
NSApp
];
[
board
setString
:
str
forType
:
NSStringPboardType
];
}
}
char
*
OSXCopyFromClipboard
()
{
NSString
*
str
;
NSPasteboard
*
board
;
char
*
result
;
result
=
NULL
;
board
=
[
NSPasteboard
generalPasteboard
];
str
=
[
board
stringForType
:
NSStringPboardType
];
if
(
str
!=
nil
)
result
=
(
char
*
)[
str
cStringUsingEncoding
:
NSWindowsCP1252StringEncoding
];
return
(
result
);
}
// Copyright (C) 2005-2006 Etienne Petitjean
// Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "OSXClipboard.h"
#import <Cocoa/Cocoa.h>
void
OSXCopyToClipboard
(
const
char
*
text
)
{
NSString
*
str
;
NSPasteboard
*
board
;
if
((
text
!=
NULL
)
&&
(
strlen
(
text
)
>
0
))
{
str
=
[
NSString
stringWith
UTF8String
:
text
];
board
=
[
NSPasteboard
generalPasteboard
];
[
board
declareTypes
:[
NSArray
arrayWithObject
:
NSStringPboardType
]
owner
:
NSApp
];
[
board
setString
:
str
forType
:
NSStringPboardType
];
}
}
char
*
OSXCopyFromClipboard
()
{
NSString
*
str
;
NSPasteboard
*
board
;
char
*
result
;
result
=
NULL
;
board
=
[
NSPasteboard
generalPasteboard
];
str
=
[
board
stringForType
:
NSStringPboardType
];
if
(
str
!=
nil
)
result
=
(
char
*
)[
str
UTF8String
];
return
(
result
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment