2013-02-22 08:42:36 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
* MacFreeRDP
|
|
|
|
*
|
|
|
|
* Copyright 2012 Thomas Goddard
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2012-06-20 20:57:20 +04:00
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
#import "freerdp/gdi/gdi.h"
|
|
|
|
#import "freerdp/rail/rail.h"
|
2012-10-09 21:38:42 +04:00
|
|
|
|
2012-08-02 21:04:44 +04:00
|
|
|
#import "MRDPRailWindow.h"
|
2012-06-20 20:57:20 +04:00
|
|
|
|
|
|
|
@interface MRDPRailView : NSView
|
|
|
|
{
|
2013-02-22 06:42:47 +04:00
|
|
|
freerdp* rdp_instance;
|
|
|
|
rdpContext* context;
|
|
|
|
NSBitmapImageRep* bmiRep;
|
|
|
|
NSPoint savedDragLocation;
|
|
|
|
char* pixelData;
|
|
|
|
BOOL mouseInClientArea;
|
|
|
|
BOOL titleBarClicked;
|
|
|
|
BOOL gestureEventInProgress;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int savedWindowId;
|
|
|
|
int scrollWheelCount;
|
|
|
|
|
|
|
|
int kdlshift;
|
|
|
|
int kdrshift;
|
|
|
|
int kdlctrl;
|
|
|
|
int kdrctrl;
|
|
|
|
int kdlalt;
|
|
|
|
int kdralt;
|
|
|
|
int kdlmeta;
|
|
|
|
int kdrmeta;
|
|
|
|
int kdcapslock;
|
|
|
|
|
|
|
|
@public
|
|
|
|
BOOL isMoveSizeInProgress;
|
|
|
|
BOOL saveInitialDragLoc;
|
|
|
|
BOOL skipMoveWindowOnce;
|
|
|
|
int localMoveType;
|
2012-06-20 20:57:20 +04:00
|
|
|
}
|
|
|
|
|
2012-11-01 07:04:31 +04:00
|
|
|
@property (assign) MRDPRailWindow* mrdpRailWindow;
|
2012-08-02 21:04:44 +04:00
|
|
|
@property (assign) int windowIndex;
|
2012-10-09 10:38:39 +04:00
|
|
|
@property (assign) BOOL activateWindow;
|
2012-08-02 21:04:44 +04:00
|
|
|
|
2012-11-01 07:04:31 +04:00
|
|
|
- (void) windowDidMove:(NSNotification*) notification;
|
2012-06-20 20:57:20 +04:00
|
|
|
- (void) updateDisplay;
|
2012-11-01 07:04:31 +04:00
|
|
|
- (void) setRdpInstance:(freerdp*) instance width:(int) w andHeight:(int) h windowID:(int) windowID;
|
2012-06-20 20:57:20 +04:00
|
|
|
- (void) setupBmiRep:(int) width :(int) height;
|
2012-08-02 21:04:44 +04:00
|
|
|
- (void) releaseResources;
|
2012-06-20 20:57:20 +04:00
|
|
|
|
2012-11-01 07:04:31 +04:00
|
|
|
void mac_rail_MoveWindow(rdpRail* rail, rdpWindow* window);
|
|
|
|
void apple_to_windowMove(NSRect* r, RAIL_WINDOW_MOVE_ORDER* windowMove);
|
|
|
|
void mac_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param);
|
|
|
|
void windows_to_apple_cords(NSRect* r);
|
|
|
|
void rail_MoveWindow(rdpRail* rail, rdpWindow* window);
|
2012-08-02 21:04:44 +04:00
|
|
|
void mac_rail_send_activate(int window_id);
|
2012-06-20 20:57:20 +04:00
|
|
|
|
|
|
|
@end
|