2017-06-06 15:01:41 +03:00
|
|
|
#ifndef FREERDP_CLIENT_MAC_MRDPVIEW_H
|
|
|
|
#define FREERDP_CLIENT_MAC_MRDPVIEW_H
|
2013-12-10 00:30:00 +04:00
|
|
|
|
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-05-03 07:15:27 +04:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2013-06-18 22:30:21 +04:00
|
|
|
#import "mfreerdp.h"
|
|
|
|
#import "mf_client.h"
|
2014-03-04 23:01:01 +04:00
|
|
|
#import "Keyboard.h"
|
2013-06-18 22:30:21 +04:00
|
|
|
|
2018-11-29 17:46:37 +03:00
|
|
|
#import <CoreGraphics/CoreGraphics.h>
|
|
|
|
|
2012-05-03 07:15:27 +04:00
|
|
|
@interface MRDPView : NSView
|
|
|
|
{
|
2013-10-08 00:43:23 +04:00
|
|
|
mfContext* mfc;
|
2013-02-22 08:42:36 +04:00
|
|
|
NSBitmapImageRep* bmiRep;
|
|
|
|
NSMutableArray* cursors;
|
|
|
|
NSMutableArray* windows;
|
|
|
|
NSTimer* pasteboard_timer;
|
2013-10-08 00:43:23 +04:00
|
|
|
NSCursor* currentCursor;
|
2013-02-22 08:42:36 +04:00
|
|
|
NSRect prevWinPosition;
|
2013-06-23 06:55:51 +04:00
|
|
|
freerdp* instance;
|
|
|
|
rdpContext* context;
|
2013-03-11 20:14:44 +04:00
|
|
|
CGContextRef bitmap_context;
|
2013-02-22 08:42:36 +04:00
|
|
|
char* pixel_data;
|
|
|
|
int argc;
|
2013-10-08 00:43:23 +04:00
|
|
|
char** argv;
|
|
|
|
DWORD kbdModFlags;
|
|
|
|
BOOL initialized;
|
2013-02-22 08:42:36 +04:00
|
|
|
NSPoint savedDragLocation;
|
|
|
|
BOOL firstCreateWindow;
|
|
|
|
BOOL isMoveSizeInProgress;
|
|
|
|
BOOL skipResizeOnce;
|
|
|
|
BOOL saveInitialDragLoc;
|
|
|
|
BOOL skipMoveWindowOnce;
|
2012-05-03 07:15:27 +04:00
|
|
|
@public
|
2014-11-06 01:14:32 +03:00
|
|
|
NSPasteboard* pasteboard_rd;
|
|
|
|
NSPasteboard* pasteboard_wr;
|
2013-02-22 08:42:36 +04:00
|
|
|
int pasteboard_changecount;
|
|
|
|
int pasteboard_format;
|
2013-03-11 20:14:44 +04:00
|
|
|
int is_connected;
|
2012-05-03 07:15:27 +04:00
|
|
|
}
|
|
|
|
|
2013-06-23 06:55:51 +04:00
|
|
|
- (int) rdpStart :(rdpContext*) rdp_context;
|
2013-07-16 20:16:44 +04:00
|
|
|
- (void) setCursor: (NSCursor*) cursor;
|
2013-10-02 18:24:01 +04:00
|
|
|
- (void) setScrollOffset:(int)xOffset y:(int)yOffset w:(int)width h:(int)height;
|
2013-07-16 20:16:44 +04:00
|
|
|
|
2016-08-03 16:29:24 +03:00
|
|
|
- (void) onPasteboardTimerFired :(NSTimer*) timer;
|
2014-11-06 01:14:32 +03:00
|
|
|
- (void) pause;
|
|
|
|
- (void) resume;
|
2012-05-03 07:15:27 +04:00
|
|
|
- (void) releaseResources;
|
|
|
|
|
2016-08-03 16:29:24 +03:00
|
|
|
@property(assign) int is_connected;
|
2012-05-03 07:15:27 +04:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
/* Pointer Flags */
|
2013-05-31 20:48:40 +04:00
|
|
|
#define PTR_FLAGS_WHEEL 0x0200
|
|
|
|
#define PTR_FLAGS_WHEEL_NEGATIVE 0x0100
|
|
|
|
#define PTR_FLAGS_MOVE 0x0800
|
|
|
|
#define PTR_FLAGS_DOWN 0x8000
|
|
|
|
#define PTR_FLAGS_BUTTON1 0x1000
|
|
|
|
#define PTR_FLAGS_BUTTON2 0x2000
|
|
|
|
#define PTR_FLAGS_BUTTON3 0x4000
|
|
|
|
#define WheelRotationMask 0x01FF
|
2013-07-04 22:42:40 +04:00
|
|
|
|
|
|
|
BOOL mac_pre_connect(freerdp* instance);
|
|
|
|
BOOL mac_post_connect(freerdp* instance);
|
2018-11-29 18:29:07 +03:00
|
|
|
void mac_post_disconnect(freerdp* instance);
|
2016-08-03 16:29:24 +03:00
|
|
|
BOOL mac_authenticate(freerdp* instance, char** username, char** password,
|
|
|
|
char** domain);
|
2018-11-29 18:29:07 +03:00
|
|
|
BOOL mac_gw_authenticate(freerdp* instance, char** username, char** password,
|
2018-11-30 13:35:40 +03:00
|
|
|
char** domain);
|
2018-11-29 18:29:07 +03:00
|
|
|
|
2018-11-30 13:35:40 +03:00
|
|
|
DWORD mac_verify_certificate_ex(freerdp* instance, const char* host, UINT16 port,
|
|
|
|
const char* common_name, const char* subject,
|
|
|
|
const char* issuer, const char* fingerprint,
|
|
|
|
DWORD flags);
|
|
|
|
DWORD mac_verify_changed_certificate_ex(freerdp* instance, const char* host,
|
|
|
|
UINT16 port, const char* common_name,
|
|
|
|
const char* subject, const char* issuer,
|
|
|
|
const char* fingerprint,
|
|
|
|
const char* old_subject,
|
|
|
|
const char* old_issuer,
|
|
|
|
const char* old_fingerprint,
|
|
|
|
DWORD flags);
|
2013-12-10 00:30:00 +04:00
|
|
|
|
2018-11-29 18:29:07 +03:00
|
|
|
int mac_logon_error_info(freerdp* instance, UINT32 data, UINT32 type);
|
2017-06-06 15:01:41 +03:00
|
|
|
#endif /* FREERDP_CLIENT_MAC_MRDPVIEW_H */
|