Commit 53e23534 authored by hybrid's avatar hybrid

Converted to dos line-endings.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@862 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 80c4ef04
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h"
@interface AppDelegate : NSObject
{
BOOL _quit;
irr::CIrrDeviceMacOSX *_device;
}
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device;
@end
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h"
@interface AppDelegate : NSObject
{
BOOL _quit;
irr::CIrrDeviceMacOSX *_device;
}
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device;
@end
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import "AppDelegate.h"
@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)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
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#import "AppDelegate.h"
@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)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
This diff is collapsed.
This diff is collapsed.
//
// Prefix header for all source files of the 'MacOSX' target in the 'MacOSX' project.
//
#include <architecture/byte_order.h>
//
// Prefix header for all source files of the 'MacOSX' target in the 'MacOSX' project.
//
#include <architecture/byte_order.h>
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#ifdef __cplusplus
extern "C" {
#endif
void OSXCopyToClipboard(const char *text);
char* OSXCopyFromClipboard();
#ifdef __cplusplus
}
#endif
// Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#ifdef __cplusplus
extern "C" {
#endif
void OSXCopyToClipboard(const char *text);
char* OSXCopyFromClipboard();
#ifdef __cplusplus
}
#endif
// Copyright (C) 2005 Etienne Petitjean
// 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 stringWithCString: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 Etienne Petitjean
// 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 stringWithCString: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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment