Skip to content

Commit

Permalink
forgot this file
Browse files Browse the repository at this point in the history
  • Loading branch information
tj_devel709 committed Oct 18, 2023
1 parent b753413 commit 1201398
Showing 1 changed file with 126 additions and 0 deletions.
126 changes: 126 additions & 0 deletions src/printcore.cs
Original file line number Diff line number Diff line change
@@ -1 +1,127 @@
using CoreFoundation;
using ObjCRuntime;
using Foundation;
using System;

#if MONOMAC
using AppKit;
#else
using UIKit;
using NSView = AppKit.UIView;
#endif

#if !NET
using NativeHandle = System.IntPtr;
#endif

namespace PrintCore {

[Mac (14,0)]
[Protocol]
[BaseType (typeof (NSObject))]
interface PDEPanel
{
[Abstract]
[Export ("willShow")]
void WillShow ();

[Abstract]
[Export ("shouldHide")]
bool ShouldHide { get; }

[Abstract]
[Export ("saveValuesAndReturnError:")]
bool SaveValuesAndReturnError ([NullAllowed] out NSError error);

[Abstract]
[Export ("restoreValuesAndReturnError:")]
bool RestoreValuesAndReturnError ([NullAllowed] out NSError error);

[NullAllowed, Export ("supportedPPDOptionKeys")]
string[] SupportedPpdOptionKeys { get; }

[Abstract]
[Export ("PPDOptionKeyValueDidChange:ppdChoice:")]
void PpdOptionKeyValueDidChange (string option, string choice);

[Abstract]
[NullAllowed, Export ("panelView")]
NSView PanelView { get; }

[Abstract]
[Export ("panelName")]
string PanelName { get; }

[Abstract]
[Export ("panelKind")]
string PanelKind { get; }

[Abstract]
[NullAllowed, Export ("summaryInfo")]
NSDictionary<NSString, NSString> SummaryInfo { get; }

[Export ("shouldShowHelp")]
bool ShouldShowHelp { get; }

[Export ("shouldPrint")]
bool ShouldPrint { get; }

[Export ("printWindowWillClose:")]
void PrintWindowWillClose (bool userCanceled);
}

[Mac (14,0)]
[Protocol]
[BaseType (typeof (NSObject))]
interface PDEPlugIn
{
[Abstract]
[Export ("initWithBundle:")]
NativeHandle Constructor (NSBundle bundle);

[Abstract]
[Export ("PDEPanelsForType:withHostInfo:")]
[return: NullAllowed]
PDEPanel[] PDEPanelsForType (string pdeType, IPDEPlugInCallbackProtocol host);
}

interface IPDEPlugInCallbackProtocol { }

[Mac (14,0)]
[Protocol]
interface PDEPlugInCallbackProtocol
{
[NullAllowed, Export ("printSession")]
[Abstract]
[Internal]
// Original: unsafe PMPrintSession* PrintSession { get; }
IntPtr _GetPrintSession ();

[Abstract]
[NullAllowed, Export ("printSettings")]
// Original: unsafe PMPrintSession* PrintSettings { get; }
IntPtr _GetPrintSettings ();

[Abstract]
[Internal]
[NullAllowed, Export ("pageFormat")]
// Original: unsafe PMPageFormat* PageFormat { get; }
IntPtr _GetPageFormat ();

[Abstract]
[Internal]
[Export ("PMPrinter")]
// Original: unsafe PMPrinter* PMPrinter { get; }
IntPtr _GetPMPrinter ();

[Abstract]
[Internal]
[NullAllowed, Export ("ppdFile")]
// Original: unsafe ppd_file_s* PpdFile { get; }
IntPtr _GetPpdFile ();

[Abstract]
[Export ("willChangePPDOptionKeyValue:ppdChoice:")]
bool PpdChoice (string option, string choice);
}
}

0 comments on commit 1201398

Please sign in to comment.