2014-04-20 16:57:38 -04:00
|
|
|
|
using NTwain.Data;
|
2014-05-23 19:01:18 -04:00
|
|
|
|
using NTwain.Triplets;
|
2014-05-19 20:48:21 -04:00
|
|
|
|
using System;
|
2014-04-20 18:42:51 -04:00
|
|
|
|
using System.Collections.Generic;
|
2014-05-20 07:25:57 -04:00
|
|
|
|
using System.Threading;
|
2014-04-20 16:57:38 -04:00
|
|
|
|
|
|
|
|
|
namespace NTwain.Internals
|
|
|
|
|
{
|
2014-04-20 18:42:51 -04:00
|
|
|
|
interface ITwainSessionInternal : ITwainSession
|
2014-04-20 16:57:38 -04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the app id used for the session.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
TWIdentity AppId { get; }
|
|
|
|
|
|
2014-05-25 08:45:52 -04:00
|
|
|
|
MessageLoopHook MessageLoopHook { get; }
|
2014-05-24 18:39:07 -04:00
|
|
|
|
|
2014-04-20 16:57:38 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Changes the state right away.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="newState">The new state.</param>
|
|
|
|
|
/// <param name="notifyChange">if set to <c>true</c> to notify change.</param>
|
|
|
|
|
void ChangeState(int newState, bool notifyChange);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the pending state changer and tentatively changes the session state to the specified value.
|
|
|
|
|
/// Value will only stick if committed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="newState">The new state.</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
ICommittable GetPendingStateChanger(int newState);
|
|
|
|
|
|
2014-09-11 21:14:41 -04:00
|
|
|
|
void ChangeCurrentSource(TwainSource source);
|
2014-04-20 18:42:51 -04:00
|
|
|
|
|
|
|
|
|
ReturnCode DisableSource();
|
|
|
|
|
|
|
|
|
|
void SafeSyncableRaiseEvent(DataTransferredEventArgs e);
|
|
|
|
|
void SafeSyncableRaiseEvent(TransferErrorEventArgs e);
|
|
|
|
|
void SafeSyncableRaiseEvent(TransferReadyEventArgs e);
|
2014-05-19 20:48:21 -04:00
|
|
|
|
|
|
|
|
|
ReturnCode EnableSource(SourceEnableMode mode, bool modal, IntPtr windowHandle);
|
2014-09-11 21:14:41 -04:00
|
|
|
|
|
2014-05-20 07:25:57 -04:00
|
|
|
|
SynchronizationContext SynchronizationContext { get; set; }
|
2014-05-23 19:01:18 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the triplet operations defined for audio data group.
|
|
|
|
|
/// </summary>
|
|
|
|
|
DGAudio DGAudio { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the triplet operations defined for control data group.
|
|
|
|
|
/// </summary>
|
|
|
|
|
DGControl DGControl { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the triplet operations defined for image data group.
|
|
|
|
|
/// </summary>
|
|
|
|
|
DGImage DGImage { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the direct triplet operation entry for custom values.
|
|
|
|
|
/// </summary>
|
|
|
|
|
DGCustom DGCustom { get; }
|
2014-04-20 16:57:38 -04:00
|
|
|
|
}
|
|
|
|
|
}
|