/// <summary>
 /// <para>Displays a sheet that allows users to change keychain settings.</para>
 /// <para>Original signature is '- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo settings:(SecKeychainSettings *)settings keychain:(SecKeychainRef)keychain'</para>
 /// <para>Available in Mac OS X v10.3 and later.</para>
 /// </summary>
 /// <param name="docWindow">The parent window to which the sheet is attached. If this parameter is nil, the behavior defaults to a standalone modal window.</param>
 /// <param name="modalDelegate">The delegate object in which the method specified in the didEndSelector parameter is implemented.</param>
 /// <param name="contextInfo">A pointer to data that is passed to the delegate method. You can use this data pointer for any purpose you wish.</param>
 /// <param name="settings">A pointer to a keychain settings structure. Because this structure is versioned, you must preallocate it and fill in the version of the structure.</param>
 /// <param name="keychain">The keychain whose settings you wish to have the user change.</param>
 public void BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain(NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<SFKeychainSettingsPanel> modalDelegate, IntPtr contextInfo, SecKeychainSettings settings,
                                                                                       IntPtr keychain)
 {
     SFKeychainSettingsPanelSheetDispatcher sheetDispatcher = new SFKeychainSettingsPanelSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:settings:keychain:", docWindow, sheetDispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo, settings,
                                   keychain);
 }
        /// <summary>
        /// <para>Displays one or more certificates in a modal sheet.</para>
        /// <para>Original signature is '- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo certificates:(NSArray *)certificates showGroup:(BOOL)showGroup'</para>
        /// <para>Available in Mac OS X v10.3 and later.</para>
        /// </summary>
        /// <param name="docWindow">The parent window to which the sheet is attached.</param>

        /// <param name="modalDelegate">The delegate object in which the method specified in the didEndSelector parameter is implemented.</param>
        /// <param name="contextInfo">A pointer to data that is passed to the delegate method. You can use this data pointer for any purpose you wish.</param>
        /// <param name="certificates">The certificates to display. Pass an NSArray containing one or more objects of type SecCertificateRef in this parameter. The first certificate in the array must be the leaf certificate. The other certificates (if any) can be included in any order.</param>
        /// <param name="showGroup">Specifies whether additional certificates (other than the leaf certificate) are displayed.</param>
        public void BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup(NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<SFCertificateTrustPanel> modalDelegate, IntPtr contextInfo, NSArray certificates,
                                                                                                   bool showGroup)
        {

            SFCertificateTrustPanelSheetDispatcher sheetDispatcher = new SFCertificateTrustPanelSheetDispatcher(modalDelegate);
            ObjectiveCRuntime.SendMessage(this, "beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:certificates:showGroup:", docWindow, sheetDispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo, certificates,
                                          showGroup);
        }
예제 #3
0
        public virtual void ApplicationWillFinishLaunching(NSNotification aNotification)
        {
            this.view = new BoingView(new NSRect(0, 0, 640, 480));
            this.window = new BoingWindow(new NSRect(100, 100, 640, 480), NSWindowStyleMask.NSBorderlessWindowMask, NSBackingStoreType.NSBackingStoreBuffered, false);
            this.window.ContentView = this.view;
            this.view.Release();

            this.window.MakeKeyAndOrderFront(null);

            this.timer = NSTimer.ScheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats(1.0/60.0, this, ObjectiveCRuntime.Selector("timerFired:"), null, true);
            this.timer.Retain();
        }
        /// <summary>
        /// <para>Displays a modal sheet that shows the results of a certificate trust evaluation and that allows the user to edit trust settings.</para>
        /// <para>Original signature is '- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo trust:(SecTrustRef)trust message:(NSString *)message'</para>
        /// <para>Available in Mac OS X v10.3 and later.</para>
        /// </summary>
        /// <param name="docWindow">The parent window to which the sheet is attached.</param>

        /// <param name="modalDelegate">The delegate object in which the method specified in the didEndSelector parameter is implemented.</param>
        /// <param name="contextInfo">A pointer to data that is passed to the delegate method. You can use this data pointer for any purpose you wish.</param>
        /// <param name="trust">A trust management object. Use the SecTrustCreateWithCertificates function (in Security/SecTrust.h) to create the trust management object.</param>
        /// <param name="message">A message string to display in the sheet.</param>

        public void BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage(NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<SFCertificateTrustPanel> modalDelegate, IntPtr contextInfo, IntPtr trust, NSString message)
        {

            SFCertificateTrustPanelSheetDispatcher sheetDispatcher = new SFCertificateTrustPanelSheetDispatcher(modalDelegate);
            ObjectiveCRuntime.SendMessage(this, "beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:", docWindow, sheetDispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo, trust, message);
        }
예제 #5
0
 public NSRect WindowWillUseStandardFrameDefaultFrame(NSWindow window, NSRect newFrame)
 {
     NSRect contentRect = this.Window.Frame;
     contentRect.size = this.Image.Size;
     return NSWindow.FrameRectForContentRectStyleMask(contentRect, window.StyleMask);
 }
예제 #6
0
 public void SheetDidEndReturnCodeContextInfo(NSWindow sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Autorelease();
 }
예제 #7
0
 /// <summary>
 ///   <para>Starts a document modal session.</para>
 ///   <para>Original signature is '- (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo'</para>
 ///   <para>Available in Mac OS X v10.0 and later.</para>
 /// </summary>
 /// <param name = "sheet">The window object representing the sheet you want to display.</param>
 /// <param name = "docWindow">The window object to which you want to attach the sheet.</param>
 /// <param name = "modalDelegate">The delegate object that defines your didEndSelector method. If nil, the method in didEndSelector is not called.</param>
 /// <param name = "contextInfo">A pointer to the context info you want passed to the didEndSelector method when the sheet�s modal session ends.</param>
 public void BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(NSWindow sheet, NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<NSWindow> modalDelegate, IntPtr contextInfo)
 {
     NSApplicationSheetDispatcher sheetDispatcher = new NSApplicationSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", sheet, docWindow, sheetDispatcher, ObjectiveCRuntime.Selector("sheetDidEnd:returnCode:contextInfo:"), contextInfo);
 }
예제 #8
0
partial         void GoFullScreen(Id sender)
        {
            this.isInFullScreenMode = true;

            // Pause the non-fullscreen view
            this.openGLView.StopAnimation ();

            // Mac OS X 10.6 and later offer a simplified mechanism to create full-screen contexts
            NSRect mainDisplayRect, viewRect;

            // Create a screen-sized window on the display you want to take over
            // Note, mainDisplayRect has a non-zero origin if the key window is on a secondary display
            mainDisplayRect = NSScreen.MainScreen.Frame;
            this.fullScreenWindow = new NSWindow (mainDisplayRect, NSWindowStyleMask.NSBorderlessWindowMask, NSBackingStoreType.NSBackingStoreBuffered, true);

            // Set the window level to be above the menu bar
            this.fullScreenWindow.Level = NSWindow.NSMainMenuWindowLevel + 1;

            // Perform any other window configuration you desire
            this.fullScreenWindow.IsOpaque = true;
            this.fullScreenWindow.HidesOnDeactivate = true;

            // Create a view with a double-buffered OpenGL context and attach it to the window
            // By specifying the non-fullscreen context as the shareContext, we automatically inherit the OpenGL objects (textures, etc) it has defined
            viewRect = new NSRect (0, 0, mainDisplayRect.size.width, mainDisplayRect.size.height);
            this.fullScreenView = new MyOpenGLView (viewRect, this.openGLView.OpenGLContext);
            this.fullScreenWindow.ContentView = this.fullScreenView;

            // Set the scene with the full-screen viewport and viewing transformation
            this.scene.SetViewportRect (viewRect);

            // Assign the view's MainController to self
            this.fullScreenView.MainController = this;

            // Show the window
            this.fullScreenWindow.MakeKeyAndOrderFront (this);

            if (!this.isAnimating) {
                // Mark the view as needing drawing to initalize its contents
                this.fullScreenView.NeedsDisplay = true;
            } else {
                // Start playing the animation
                this.fullScreenView.StartAnimation ();
            }
        }
예제 #9
0
 public void BeginSheetForDirectoryFileModalForWindowModalDelegateDidEndSelectorContextInfo(NSString path, NSString name, NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<NSSavePanel> modalDelegate, IntPtr contextInfo)
 {
     NSSavePanelSheetDispatcher dispatcher = new NSSavePanelSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:", path, name, docWindow, dispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo);
 }
예제 #10
0
 /// <summary>
 /// <para>Displays a Print panel sheet and runs it modally for the specified window.</para>
 /// <para>Original signature is '- (void)beginSheetWithPrintInfo:(NSPrintInfo *)printInfo modalForWindow:(NSWindow *)docWindow delegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo'</para>
 /// <para>Available in Mac OS X v10.0 and later.</para>
 /// </summary>
 /// <param name="printInfo">The printing information for the current job.</param>
 /// <param name="docWindow">The window on which to display the sheet.</param>
 /// <param name="modalDelegate">A modal delegate object assigned to handle the closing of the Print panel sheet.</param>
 /// <param name="contextInfo">A pointer to context data the didEndSelector method needs to process the sheet. This data is user-defined and may be NULL.</param>
 public void BeginSheetWithPrintInfoModalForWindowDelegateDidEndSelectorContextInfo(NSPrintInfo printInfo, NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<NSPrintPanel> modalDelegate, IntPtr contextInfo)
 {
     NSPrintPanelSheetDispatcher dispatcher = new NSPrintPanelSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", printInfo, docWindow, dispatcher, ObjectiveCRuntime.Selector("printPanelDidEnd:returnCode:contextInfo:"), contextInfo);
 }
예제 #11
0
 public void BeginSheetForDirectoryFileTypesModalForWindowModalDelegateDidEndSelectorContextInfo(NSString absoluteDirectoryPath, NSString filename, NSArray fileTypes, NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<NSOpenPanel> modalDelegate, IntPtr contextInfo)
 {
     NSOpenPanelSheetDispatcher dispatcher = new NSOpenPanelSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", absoluteDirectoryPath, filename, fileTypes, docWindow, dispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo);
 }
 /// <summary>
 /// <para>Displays a list of identities in a modal sheet from which the user can select an identity.</para>
 /// <para>Original signature is '- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo identities:(NSArray *)identities message:(NSString *)message'</para>
 /// <para>Available in Mac OS X v10.3 and later.</para>
 /// </summary>
 /// <param name="docWindow">The parent window to which the sheet is attached.</param>
 /// <param name="modalDelegate">The delegate object in which the method specified in the didEndSelector parameter is implemented.</param>
 /// <param name="contextInfo">A pointer to data that is passed to the delegate method. You can use this data pointer for any purpose you wish.</param>
 /// <param name="identities">An array of identity objects (objects of type SecIdentityRef). Use the SecIdentitySearchCopyNext function (in Security/SecIdentitySearch.h) to find identity objects.</param>
 /// <param name="message">A message string to display in the sheet.</param>
 public void BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage(NSWindow docWindow, SheetDidEndReturnCodeContextInfoEventHandler<SFChooseIdentityPanel> modalDelegate, IntPtr contextInfo, NSArray identities, NSString message)
 {
     SFChooseIdentityPanelSheetDispatcher sheetDispatcher = new SFChooseIdentityPanelSheetDispatcher(modalDelegate);
     ObjectiveCRuntime.SendMessage(this, "beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:identities:message:", docWindow, sheetDispatcher, ObjectiveCRuntime.Selector("panelDidEnd:returnCode:contextInfo:"), contextInfo, identities,
                                   message);
 }
예제 #13
0
 public void SheetDidEndReturnCodeContextInfo(NSWindow sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     sheet.OrderOut(this);
 }
예제 #14
0
		public override Id InitConnectionType(RoyalConnection data, NSTabViewItem tabViewItem, NSWindow parentWindow)
		{
			Id ret = base.InitConnectionType(data, tabViewItem, parentWindow);
			
			m_nativeFrameworkHandle = ApiUtils.LoadPluginFramework(typeof(RdpConnection), "RdpView");
			IntPtr funcSymbol = ApiUtils.GetSymbolFromHandle(m_nativeFrameworkHandle, "getRdpViewController");
			
			NativeGetRdpViewController GetRdpViewController = (NativeGetRdpViewController)ApiUtils.GetDelegateFunctionFromFramework<NativeGetRdpViewController>(funcSymbol);
			m_nativeController = ObjectiveCRuntime.GetInstance<NSObject>(GetRdpViewController(this.NativePointer, parentWindow.NativePointer));
			
			return ret;
		}