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 // Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h" #import "CIrrDeviceMacOSX.h"
@interface AppDelegate : NSObject @interface AppDelegate : NSObject
{ {
BOOL _quit; BOOL _quit;
irr::CIrrDeviceMacOSX *_device; irr::CIrrDeviceMacOSX *_device;
} }
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device; - (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device;
@end @end
// Copyright (C) 2005 Etienne Petitjean // Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#import "AppDelegate.h" #import "AppDelegate.h"
@implementation AppDelegate @implementation AppDelegate
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device - (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device
{ {
self = [super init]; self = [super init];
if (self) _device = device; if (self) _device = device;
return (self); return (self);
} }
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{ {
_quit = FALSE; _quit = FALSE;
} }
- (void)orderFrontStandardAboutPanel:(id)sender - (void)orderFrontStandardAboutPanel:(id)sender
{ {
[NSApp orderFrontStandardAboutPanel:sender]; [NSApp orderFrontStandardAboutPanel:sender];
} }
- (void)unhideAllApplications:(id)sender - (void)unhideAllApplications:(id)sender
{ {
[NSApp unhideAllApplications:sender]; [NSApp unhideAllApplications:sender];
} }
- (void)hide:(id)sender - (void)hide:(id)sender
{ {
[NSApp hide:sender]; [NSApp hide:sender];
} }
- (void)hideOtherApplications:(id)sender - (void)hideOtherApplications:(id)sender
{ {
[NSApp hideOtherApplications:sender]; [NSApp hideOtherApplications:sender];
} }
- (void)terminate:(id)sender - (void)terminate:(id)sender
{ {
_quit = TRUE; _quit = TRUE;
} }
- (void)windowDidResize:(NSNotification *)aNotification - (void)windowDidResize:(NSNotification *)aNotification
{ {
NSWindow *window; NSWindow *window;
NSRect frame; NSRect frame;
window = [aNotification object]; window = [aNotification object];
frame = [window frame]; frame = [window frame];
_device->setResize((int)frame.size.width,(int)frame.size.height); _device->setResize((int)frame.size.width,(int)frame.size.height);
} }
- (BOOL)isQuit - (BOOL)isQuit
{ {
return (_quit); return (_quit);
} }
@end @end
This diff is collapsed.
This diff is collapsed.
// //
// Prefix header for all source files of the 'MacOSX' target in the 'MacOSX' project. // Prefix header for all source files of the 'MacOSX' target in the 'MacOSX' project.
// //
#include <architecture/byte_order.h> #include <architecture/byte_order.h>
// Copyright (C) 2005 Etienne Petitjean // Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void OSXCopyToClipboard(const char *text); void OSXCopyToClipboard(const char *text);
char* OSXCopyFromClipboard(); char* OSXCopyFromClipboard();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
// Copyright (C) 2005 Etienne Petitjean // Copyright (C) 2005 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "OSXClipboard.h" #include "OSXClipboard.h"
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
void OSXCopyToClipboard(const char *text) void OSXCopyToClipboard(const char *text)
{ {
NSString *str; NSString *str;
NSPasteboard *board; NSPasteboard *board;
if (text != NULL && strlen(text) > 0) if (text != NULL && strlen(text) > 0)
{ {
str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding]; str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding];
board = [NSPasteboard generalPasteboard]; board = [NSPasteboard generalPasteboard];
[board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp]; [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp];
[board setString:str forType:NSStringPboardType]; [board setString:str forType:NSStringPboardType];
} }
} }
char* OSXCopyFromClipboard() char* OSXCopyFromClipboard()
{ {
NSString *str; NSString *str;
NSPasteboard *board; NSPasteboard *board;
char *result; char *result;
result = NULL; result = NULL;
board = [NSPasteboard generalPasteboard]; board = [NSPasteboard generalPasteboard];
str = [board stringForType:NSStringPboardType]; str = [board stringForType:NSStringPboardType];
if (str != nil) result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; if (str != nil) result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
return (result); 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