Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: 4.0.0.235
+Version: 4.0.0.243
Release: 1
Group: Development/Libraries
License: Apache-2.0
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
./build.sh --full
./build.sh --dummy
-./build.sh --pack 4.0.0-preview1-00235
+./build.sh --pack 4.0.0-preview1-00243
%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
res/maps_marker_sticker_48.png #mobile #mobile-emul #tv
res/maps_marker_sticker_72.png #mobile #mobile-emul #tv
Tizen.Account.AccountManager.dll #mobile #mobile-emul #ivi #wearable
-Tizen.Account.FidoClient.dll #mobile #mobile-emul #wearable
+Tizen.Account.FidoClient.dll #mobile #mobile-emul #wearable #tv
Tizen.Account.OAuth2.dll #mobile #mobile-emul #ivi #wearable
Tizen.Account.SyncManager.dll #mobile #mobile-emul #wearable
Tizen.Applications.Alarm.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Uix.InputMethod
Tizen.Uix.InputMethodManager
Tizen.Uix.Stt
+Tizen.Uix.SttEngine
Tizen.Uix.Tts
+Tizen.Uix.TtsEngine
Tizen.Uix.VoiceControl
Tizen.WebView
/// <summary>
/// The Wrapper class for maintaining names of dependent native libraries.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
internal static partial class Libraries
{
public const string SyncManager = "libcore-sync-client.so.1";
/// <summary>
/// Enumeration for the sync option.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
[Flags]
public enum SyncOption
{
/// <summary>
/// The sync job will be operated normally.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
None = 0,
/// <summary>
/// The sync job will be operated as soon as possible.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
Expedited = 0X01,
/// <summary>
/// The sync job will not be performed again when it fails.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
NoRetry = 0X02,
}
/// <summary>
/// Enumeration for the sync period.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum SyncPeriod
{
/// <summary>
/// Sync within 30 minutes.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
ThirtyMin = 0,
/// <summary>
/// Sync within 1 hour.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
OneHour,
/// <summary>
/// Sync within 2 hours.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
TwoHours,
/// <summary>
/// Sync within 3 hours.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
ThreeHours,
/// <summary>
/// Sync within 6 hours.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
SixHours,
/// <summary>
/// Sync within 12 hours.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
TwelveHours,
/// <summary>
/// Sync within 1 day.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
OneDay,
}
}
/// <summary>
/// This class contains the delegates to be called upon scheduling a sync operation.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class SyncAdapter
{
Interop.Adapter.SyncAdapterStartSyncCallback _startSyncCallback;
/// <summary>
/// The callback function for the sync adapter's start sync request.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="syncParameters"> The sync job parameters corresponding to the sync request. </param>
/// <returns> true if the sync operation is success, @c false otherwise. </returns>
public delegate bool StartSyncCallback(SyncJobData syncParameters);
/// <summary>
/// The callback function for the sync adapter's cancel sync request.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="syncParameters"> The sync job parameters corresponding to the sync request. </param>
public delegate void CancelSyncCallback(SyncJobData syncParameters);
/// <summary>
/// Sets the client (sync adapter) callback functions.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="startSyncCb"> A callback function to be called by the sync manager for performing the sync operation. </param>
/// <param name="cancelSyncCb"> A callback function to be called by the sync manager for cancelling the sync operation. </param>
/// <exception cref="ArgumentNullException"> Thrown when any of the arguments are null. </exception>
/// <summary>
/// Unsets the client (sync adapter) callback functions.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <exception cref="System.Exception"> Thrown when sync manager internal error occurs. </exception>
public void UnsetSyncEventCallbacks()
{
/// The SyncClient APIs for managing the sync operations. Applications will call these APIs to schedule their sync operations.
/// The sync service maintains sync requests from all the applications and invokes their respective callback methods to perform account synchronization operations.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public static class SyncClient
{
/// <summary>
/// The constructor.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
static SyncClient()
{
}
/// <summary>
/// Requests the sync manager to perform one time sync operation.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="request"> The sync job information of the sync job request. </param>
/// <param name="syncOptions"> Sync options determine a way to operate the sync job and can be used as ORing. </param>
/// <exception cref="ArgumentNullException"> Thrown when any of the arugments are null. </exception>
/// <summary>
/// Requests the sync manager to perform periodic sync operations.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="request"> The sync job information of the sync job request. </param>
/// <param name="period"> Determines the time interval of the periodic sync. The periodic sync operation can be triggered in that interval, but it does not guarantee the exact time. The minimum value is 30 minutes. </param>
/// <param name="syncOptions"> Sync options determine a way to operate the sync job and can be used as ORing. </param>
/// <summary>
/// Requests the sync manager to perform sync operations whenever the corresponding DB is changed.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="request"> The sync job information of the sync job request. </param>
/// <param name="syncOptions"> Sync options determine a way to operate the sync job and can be used as ORing. </param>
/// <privilege>http://tizen.org/privilege/calendar.read</privilege>
/// <summary>
/// Gets all the sync jobs registered with the sync manager.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <returns>
/// Returns the list of SyncJobData corresponding to sync requests.
/// </returns>
/// <summary>
/// Requests the sync manager to remove the corresponding sync job based on the ID.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="id"> A unique value of each sync job, it can be used to search a specific sync job and remove it. </param>
/// <exception cref="ArgumentException"> Thrown if the input arugments is invalid. </exception>
public static void RemoveSyncJob(int id)
/// <summary>
/// This class represents information about the sync job request.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class SyncJobData
{
/// <summary>
/// Represents the calendar capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the calendar database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// Represents the contact capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the contact database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// Represents the image capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the image database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// Represents the video capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the video database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// Represents the sound capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the sound database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// Represents the music capability.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <remarks>
/// If you want to receive notification about the music database change, assign it to the SyncJobName property of the SyncJobData object.
/// </remarks>
/// <summary>
/// The account instance on which the sync operation was requested or @c null in the case of the accountless sync operation.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public AccountManager.Account Account { get; set; }
/// <summary>
/// User data which contains an additional information related to the registered sync job.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public Bundle UserData { get; set; }
/// <summary>
/// A string representing a sync job which has been operated or capability setting to operate the data change sync job.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public string SyncJobName { get; set; }
}
}
Interop.MessagePort.CheckTrustedRemotePort(_appId, _portName, out _isRunning) :
Interop.MessagePort.CheckRemotePort(_appId, _portName, out _isRunning);
- if (ret != (int)MessagePortError.None)
+ if (ret == (int)MessagePortError.CertificateNotMatch)
+ {
+ /* Although Remote port is NotMatch, it is running */
+ _isRunning = true;
+ }
+ else if (ret != (int)MessagePortError.None)
{
MessagePortErrorFactory.ThrowException(ret);
}
/// <code>
/// Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
/// remotePort.RemotePortStateChanged += RemotePortStateChangedCallback;
- /// static void RemotePortStateChangedCallback(object sender, MessageReceivedEventArgs e)
+ /// static void RemotePortStateChangedCallback(object sender, RemotePortStateChangedEventArgs e)
/// {
/// switch (e.Status)
/// {
return;
}
- if (disposing)
+ if (disposing && Handle != null && Handle.IsInvalid == false)
{
Handle.Dispose();
}
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.26730.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Content.MediaContent", "Tizen.Content.MediaContent.csproj", "{45518596-2EC9-4624-9AE9-D9A0E6708B8C}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{4FCA7B32-660F-46BF-820F-EBA7C039733F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\Tizen.System.Information\Tizen.System.Information.csproj", "{5DC1DFF0-66E9-4FC7-AF13-51148389C8A8}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{4FCA7B32-660F-46BF-820F-EBA7C039733F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FCA7B32-660F-46BF-820F-EBA7C039733F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FCA7B32-660F-46BF-820F-EBA7C039733F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5DC1DFF0-66E9-4FC7-AF13-51148389C8A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5DC1DFF0-66E9-4FC7-AF13-51148389C8A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5DC1DFF0-66E9-4FC7-AF13-51148389C8A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5DC1DFF0-66E9-4FC7-AF13-51148389C8A8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {02786CC2-2BE4-450E-958F-FCF4BAEB0B19}
+ EndGlobalSection
EndGlobal
* limitations under the License.
*/
+using System;
+
namespace Tizen.Content.MediaContent
{
/// <summary>
/// <value>The column name for the date added of media.</value>
/// <remarks>
/// The value type is integer.
- /// <see cref="System.DateTimeOffset"/> needs to be converted into the unix time.
+ /// <see cref="DateTimeOffset"/> needs to be converted into the unix time.
/// </remarks>
/// <seealso cref="MediaInfo.DateAdded"/>
- /// <seealso cref="System.DateTimeOffset.ToUnixTimeSeconds"/>
+ /// <seealso cref="DateTimeOffset.ToUnixTimeSeconds"/>
public static string DateAdded => "MEDIA_ADDED_TIME";
/// <summary>
/// <value>The column name for the date modified of media.</value>
/// <remarks>
/// The value type is integer.
- /// <see cref="System.DateTimeOffset"/> needs to be converted into the unix time.
+ /// <see cref="DateTimeOffset"/> needs to be converted into the unix time.
/// </remarks>
/// <seealso cref="MediaInfo.DateModified"/>
- /// <seealso cref="System.DateTimeOffset.ToUnixTimeSeconds"/>
+ /// <seealso cref="DateTimeOffset.ToUnixTimeSeconds"/>
public static string DateModified => "MEDIA_MODIFIED_TIME";
/// <summary>
/// <value>The column name for the timeline of media.</value>
/// <remarks>
/// The value type is integer.
- /// <see cref="System.DateTimeOffset"/> needs to be converted into the unix time.
+ /// <see cref="DateTimeOffset"/> needs to be converted into the unix time.
/// </remarks>
/// <seealso cref="MediaInfo.Timeline"/>
- /// <seealso cref="System.DateTimeOffset.ToUnixTimeSeconds"/>
+ /// <seealso cref="DateTimeOffset.ToUnixTimeSeconds"/>
public static string Timeline => "MEDIA_TIMELINE";
/// <summary>
private static Capabilities LoadCapabilities()
{
- Native.Create(out var handle).ThrowIfError("Failed to load the capabilities"); ;
+ var ret = Native.Create(out var handle);
+
+ if (ret == RecorderErrorCode.NotSupported)
+ {
+ throw new NotSupportedException("Audio recording is not supported.");
+ }
+
+ ret.ThrowIfError("Failed to load the capabilities");
+
using (handle)
{
return new Capabilities(handle);
return _frontResolutions ?? (_frontResolutions = LoadVideoResolutions(CameraDevice.Front));
}
- if (device == CameraDevice.Front)
+ if (device == CameraDevice.Rear)
{
return _rearResolutions ?? (_rearResolutions = LoadVideoResolutions(CameraDevice.Rear));
}
/// <exception cref="ArgumentException">
/// <paramref name="videoCodec"/> is not valid.\n
/// -or-\n
- /// <paramref name="fileFormat"/> is not valid.
+ /// <paramref name="fileFormat"/> is not valid.\n
+ /// -or-\n
+ /// <paramref name="camera"/> is being used by another object.
/// </exception>
/// <exception cref="ObjectDisposedException"><paramref name="camera"/> has been disposed of.</exception>
/// <exception cref="ArgumentNullException"><paramref name="camera"/> is null.</exception>
/// </summary>
public class ScreenMirroring : IDisposable, IDisplayable<ScreenMirroringErrorCode>
{
+ private const string Feature = "http://tizen.org/feature/network.wifi.direct.display";
private const int Port = 2022;
private IntPtr _handle;
}
}
+ private static bool IsSupported()
+ {
+ return System.Information.TryGetValue(Feature, out bool isSupported) ? isSupported : false;
+ }
+
/// <summary>
/// Initializes a new instance of the ScreenMirroring class.
/// </summary>
/// <exception cref="NotSupportedException">The feature is not supported.</exception>
public ScreenMirroring()
{
+ if (IsSupported() == false)
+ {
+ throw new PlatformNotSupportedException($"The feature({Feature}) is not supported on the current device");
+ }
+
Native.Create(out _handle).ThrowIfError("Failed to create ScreenMirroring.");
_state = new AtomicState();
byte[] tmpBuf = new byte[dataSize];
Marshal.Copy(thumbData, tmpBuf, 0, dataSize);
- tcs.SetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight));
+ tcs.TrySetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight));
}
catch (Exception e)
{
- tcs.SetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e));
+ tcs.TrySetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e));
}
finally
{
}
else
{
- tcs.SetException(error.ToException("Failed to extract."));
+ tcs.TrySetException(error.ToException("Failed to extract."));
}
};
}
/// <summary>
/// Region changed event callback function.
/// </summary>
- /// <param name="source">Application instance</param>
+ /// <param name="sender">Application instance</param>
/// <param name="e">Event argument for RegionChanged</param>
private void OnRegionChanged(object sender, WidgetApplication.WidgetApplicationEventArgs e)
{
/// <summary>
/// Memory Low event callback function.
/// </summary>
- /// <param name="source">Application instance</param>
+ /// <param name="sender">Application instance</param>
/// <param name="e">Event argument for MemoryLow</param>
private void OnMemoryLow(object sender, WidgetApplication.WidgetApplicationEventArgs e)
{
/// <summary>
/// Language changed event callback function.
/// </summary>
- /// <param name="source">Application instance</param>
+ /// <param name="sender">Application instance</param>
/// <param name="e">Event argument for LanguageChanged</param>
private void OnLanguageChanged(object sender, WidgetApplication.WidgetApplicationEventArgs e)
{
/// <summary>
/// Battery low event callback function.
/// </summary>
- /// <param name="source">Application instance</param>
+ /// <param name="sender">Application instance</param>
/// <param name="e">Event argument for BatteryLow</param>
private void OnBatteryLow(object sender, WidgetApplication.WidgetApplicationEventArgs e)
{
/// <summary>
/// Adds a child view to this view.
/// </summary>
- /// <seealso cref="Container::Add()">
+ /// <seealso cref="Container.Add()">
/// </seealso>
public override void Add(View child)
{
/// <summary>
/// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
/// </summary>
- /// <seealso cref="Container::Remove()">
+ /// <seealso cref="Container.Remove()">
/// </seealso>
public override void Remove(View child)
{
/// <summary>
/// Retrieves a child view by index.
/// </summary>
- /// <seealso cref="Container::GetChildAt()">
+ /// <seealso cref="Container.GetChildAt()">
/// </seealso>
public override View GetChildAt(uint index)
{
/// <summary>
/// Retrieves the number of children held by the view.
/// </summary>
- /// <seealso cref="Container::GetChildCount()">
+ /// <seealso cref="Container.GetChildCount()">
/// </seealso>
protected override uint GetChildCount()
{
/// <summary>
/// Gets the views parent.
/// </summary>
- /// <seealso cref="Container::GetParent()">
+ /// <seealso cref="Container.GetParent()">
protected override Container GetParent()
{
Container ret;
return true;
}
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is BaseHandle))
+ {
+ return false;
+ }
+ BaseHandle b = (BaseHandle)o;
+ if (!BaseHandle.ReferenceEquals(this, null) && !BaseHandle.ReferenceEquals(b, null))
+ {
+ // drop into native code to see if both handles point to the same body
+ return this.IsEqual(b);
+ }
+
+ if (BaseHandle.ReferenceEquals(this, null) && !BaseHandle.ReferenceEquals(b, null))
+ {
+ if (b.HasBody()) return false;
+ else return true;
+ }
+ if (!BaseHandle.ReferenceEquals(this, null) && BaseHandle.ReferenceEquals(b, null))
+ {
+ if (this.HasBody()) return false;
+ else return true;
+ }
+
+ return false;
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1())
{
/// <summary>
/// Removes a child view from this view. If the view was not a child of this view, this is a no-op.
/// </summary>
- /// <pre>This view (the parent) has been initialized. The child view is not the same as the parent view.</pre>
- /// <param name="child">The child.</param>
+ /// <pre>This View(the parent) has been initialized. The child view is not the same as the parent view.</pre>
+ /// <param name="view">The view to remove</param>
public abstract void Remove( View view );
/// <summary>
}
}
}
-} // namespace Tizen.NUI
\ No newline at end of file
+} // namespace Tizen.NUI
/// <summary>
/// Adds a child view to this layer.
/// </summary>
- /// <seealso cref="Container::Add()">
+ /// <seealso cref="Container.Add()">
/// </seealso>
public override void Add(View child)
{
/// <summary>
/// Removes a child view from this layer. If the view was not a child of this layer, this is a no-op.
/// </summary>
- /// <seealso cref="Container::Add()">
+ /// <seealso cref="Container.Remove()">
/// </seealso>
public override void Remove(View child)
{
return !(a == b);
}
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is PaddingType))
+ {
+ return false;
+ }
+ PaddingType p = (PaddingType)o;
+
+ // Return true if the fields match:
+ return (System.Math.Abs(Left - p.Left) < NDalic.GetRangedEpsilon(Left, p.Left)) &&
+ (System.Math.Abs(Right - p.Right) < NDalic.GetRangedEpsilon(Right, p.Right)) &&
+ (System.Math.Abs(Bottom - p.Bottom) < NDalic.GetRangedEpsilon(Bottom, p.Bottom)) &&
+ (System.Math.Abs(Top - p.Top) < NDalic.GetRangedEpsilon(Top, p.Top));
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
///< The Left value
public float Left
{
}
/// <summary>
- /// The Inequality operator.
+ /// Equality operator.
+ /// </summary>
+ /// <param name="o">The object to compare with the current object.</param>
+ /// <returns>True if boxes are exactly same.</returns>
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is Rectangle))
+ {
+ return false;
+ }
+ Rectangle r = (Rectangle)o;
+
+ // Return true if the fields match:
+ return X == r.X && Y == r.Y && Width == r.Width && Height == r.Height;
+ }
+
+ /// <summary>
+ /// Serves as the default hash function.
+ /// </summary>
+ /// <returns>A hash code for the current object.</returns>
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ /// <summary>
+ /// Inequality operator.
/// </summary>
/// <param name="a">The first rectangle.</param>
/// <param name="b">The second rectangle.</param>
internal static extern ErrorCode ImeEventSetInputContextResetCb(ImeInputContextResetCb callbackFunction, IntPtr userData);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_cursor_position_updated_cb")]
- internal static extern ErrorCode ImeEventSetCursorPositionitionUpdatedCb(ImeCursorPositionitionUpdatedCb callbackFunction, IntPtr userData);
+ internal static extern ErrorCode ImeEventSetCursorPositionUpdatedCb(ImeCursorPositionUpdatedCb callbackFunction, IntPtr userData);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_language_requested_cb")]
internal static extern ErrorCode ImeEventSetLanguageRequestedCallbackCb(ImeLanguageRequestedCb callbackFunction, IntPtr userData);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_accessibility_state_changed_cb")]
internal static extern ErrorCode ImeEventSetAccessibilityStateChangedCb(ImeAccessibilityStateChangedCb callbackFunction, IntPtr userData);
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_created_cb")]
- internal static extern ErrorCode ImeEventSetOptionWindowCreatedCb(ImeOptionWindowCreatedCb callbackFunction, IntPtr userData);
-
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_destroyed_cb")]
- internal static extern ErrorCode ImeEventSetOptionWindowDestroyedCb(ImeOptionWindowDestroyedCb callbackFunction, IntPtr userData);
-
[DllImport(Libraries.InputMethod, EntryPoint = "ime_send_key_event")]
internal static extern ErrorCode ImeSendKeyEvent(KeyCode keycode, KeyMask keymask, bool forwardKey);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_set_size")]
internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight);
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_create_option_window")]
- internal static extern ErrorCode ImeCreateOptionWindow();
-
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_destroy_option_window")]
- internal static extern ErrorCode ImeDestroyOptionWindow(IntPtr window);
-
[DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout")]
internal static extern ErrorCode ImeContextGetLayout(IntPtr context, out InputPanelLayout layout);
internal static extern ErrorCode ImeContextGetLayoutVariation(IntPtr context, out LayoutVariation layoutVariation);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_cursor_position")]
- internal static extern ErrorCode ImeContextGetCursorPositionition(IntPtr context, out int cursorPos);
+ internal static extern ErrorCode ImeContextGetCursorPosition(IntPtr context, out int cursorPos);
[DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_autocapital_type")]
internal static extern ErrorCode ImeContextGetAutocapitalType(IntPtr context, out AutoCapitalization autocapitalType);
internal delegate void ImeInputContextResetCb(IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void ImeCursorPositionitionUpdatedCb(int cursorPos, IntPtr userData);
+ internal delegate void ImeCursorPositionUpdatedCb(int cursorPos, IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void ImeLanguageRequestedCb(IntPtr userData, out IntPtr langCode);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void ImeAccessibilityStateChangedCb(bool state, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void ImeOptionWindowCreatedCb(IntPtr window, OptionWindowType type, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void ImeOptionWindowDestroyedCb(IntPtr window, IntPtr userData);
}
}
namespace Tizen.Uix.InputMethod
{
/// <summary>
- /// This Class contains data related to CursorPositionitionUpdated Event
+ /// This Class contains data related to CursorPositionUpdated Event
/// </summary>
- public class CursorPositionitionUpdatedEventArgs
+ public class CursorPositionUpdatedEventArgs
{
- internal CursorPositionitionUpdatedEventArgs(int cursorPos)
+ internal CursorPositionUpdatedEventArgs(int cursorPos)
{
CursorPosition = cursorPos;
}
internal set;
}
}
-}
\ No newline at end of file
+}
/// <summary>
/// Gets the cursor position information.
/// </summary>
- public int CursorPositionition
+ public int CursorPosition
{
get
{
int cursorPosition;
- ErrorCode error = ImeContextGetCursorPositionition(_handle, out cursorPosition);
+ ErrorCode error = ImeContextGetCursorPosition(_handle, out cursorPosition);
if (error != ErrorCode.None)
{
- Log.Error(LogTag, "GetCursorPositionition Failed with error " + error);
+ Log.Error(LogTag, "GetCursorPosition Failed with error " + error);
return -1;
}
return cursorPosition;
/// <summary>
/// this class gives the device information, like the name, class and subclass
/// </summary>
- public class VoiceControlDeviceInformation
+ public class InputMethodDeviceInformation
{
private IntPtr _handle;
- internal VoiceControlDeviceInformation(IntPtr handle)
+ internal InputMethodDeviceInformation(IntPtr handle)
{
_handle = handle;
}
private static ImeSurroundingTextUpdatedCb _imeSurroundingTextUpdatedDelegate;
private static event EventHandler<EventArgs> _inputContextReset;
private static ImeInputContextResetCb _imeInputContextResetDelegate;
- private static event EventHandler<CursorPositionitionUpdatedEventArgs> _cursorPositionUpdated;
- private static ImeCursorPositionitionUpdatedCb _imeCursorPositionitionUpdatedDelegate;
+ private static event EventHandler<CursorPositionUpdatedEventArgs> _cursorPositionUpdated;
+ private static ImeCursorPositionUpdatedCb _imeCursorPositionUpdatedDelegate;
private static event EventHandler<LanguageSetEventArgs> _langaugeSet;
private static ImeLanguageSetCb _imeLanguageSetDelegate;
private static event EventHandler<SetDataEventArgs> _imDataSet;
private static ImeRotationChangedCb _imeRotationChangedDelegate;
private static event EventHandler<AccessibilityStateChangedEventArgs> _accessibilityStateChanged;
private static ImeAccessibilityStateChangedCb _imeAccessibilityStateChangedDelegate;
- private static event EventHandler<OptionWindowCreatedEventArgs> _optionWindowCreated;
- private static ImeOptionWindowCreatedCb _imeOptionWindowCreatedDelegate;
- private static event EventHandler<OptionWindowDestroyedEventArgs> _optionWindowDestroyed;
- private static ImeOptionWindowDestroyedCb _imeOptionWindowDestroyedDelegate;
private static ImeLanguageRequestedCb _imeLanguageRequestedDelegate;
private static OutAction<string> _languageRequestedDelegate;
- private static BoolAction<KeyCode, KeyMask, VoiceControlDeviceInformation> _processKeyDelagate;
+ private static BoolAction<KeyCode, KeyMask, InputMethodDeviceInformation> _processKeyDelagate;
private static ImeImdataRequestedCb _imeImDataRequestedDelegate;
private static OutArrayAction<byte> _imDataRequestedDelegate;
private static ImeGeometryRequestedCb _imeGeometryRequestedDelegate;
/// <summary>
/// Called when the position of the cursor in an associated text input UI control changes.
/// </summary>
- public static event EventHandler<CursorPositionitionUpdatedEventArgs> CursorPositionitionUpdated
+ public static event EventHandler<CursorPositionUpdatedEventArgs> CursorPositionUpdated
{
add
{
lock (thisLock)
{
- _imeCursorPositionitionUpdatedDelegate = (int cursorPos, IntPtr userData) =>
+ _imeCursorPositionUpdatedDelegate = (int cursorPos, IntPtr userData) =>
{
- CursorPositionitionUpdatedEventArgs args = new CursorPositionitionUpdatedEventArgs(cursorPos);
+ CursorPositionUpdatedEventArgs args = new CursorPositionUpdatedEventArgs(cursorPos);
_cursorPositionUpdated?.Invoke(null, args);
};
- ErrorCode error = ImeEventSetCursorPositionitionUpdatedCb(_imeCursorPositionitionUpdatedDelegate, IntPtr.Zero);
+ ErrorCode error = ImeEventSetCursorPositionUpdatedCb(_imeCursorPositionUpdatedDelegate, IntPtr.Zero);
if (error != ErrorCode.None)
{
- Log.Error(LogTag, "Add CursorPositionitionUpdated Failed with error " + error);
+ Log.Error(LogTag, "Add CursorPositionUpdated Failed with error " + error);
}
else
{
}
/// <summary>
- /// Called to create the option window.
- /// </summary>
- /// <remarks>
- /// if Input panel requests to open the option window, type will be OptionWindowType.Keyboard.
- /// And if Settings application requests to open it, type will be OptionWindowType.SettingApplication.
- /// </remarks>
- public static event EventHandler<OptionWindowCreatedEventArgs> OptionWindowCreated
- {
- add
- {
- lock (thisLock)
- {
- _imeOptionWindowCreatedDelegate = (IntPtr window, OptionWindowType type, IntPtr userData) =>
- {
- OptionWindow._handle = window;
- OptionWindowCreatedEventArgs args = new OptionWindowCreatedEventArgs(new OptionWindow(), type);
- _optionWindowCreated?.Invoke(null, args);
- };
- ErrorCode error = ImeEventSetOptionWindowCreatedCb(_imeOptionWindowCreatedDelegate, IntPtr.Zero);
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "Add OptionWindowCreated Failed with error " + error);
- }
- else
- {
- _optionWindowCreated += value;
- }
- }
- }
- remove
- {
- lock (thisLock)
- {
- _optionWindowCreated -= value;
- }
- }
- }
-
- /// <summary>
- /// Called to destroy the option window.
- /// </summary>
- public static event EventHandler<OptionWindowDestroyedEventArgs> OptionWindowDestroyed
- {
- add
- {
- lock (thisLock)
- {
- _imeOptionWindowDestroyedDelegate = (IntPtr window, IntPtr userData) =>
- {
- OptionWindow._handle = window;
- OptionWindowDestroyedEventArgs args = new OptionWindowDestroyedEventArgs(new OptionWindow());
- _optionWindowDestroyed?.Invoke(null, args);
- };
- ErrorCode error = ImeEventSetOptionWindowDestroyedCb(_imeOptionWindowDestroyedDelegate, IntPtr.Zero);
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "Add OptionWindowDestroyed Failed with error " + error);
- }
- else
- {
- _optionWindowDestroyed += value;
- }
- }
- }
- remove
- {
- lock (thisLock)
- {
- _optionWindowDestroyed -= value;
- }
- }
- }
-
- /// <summary>
/// Sets the languageRequested Action
/// </summary>
/// <param name="languageRequested">
/// The Action is alled when the key event is received from the external devices or SendKey function.
/// This Event processes the key event before an associated text input UI control does.
/// </param>
- public static void SetProcessKeyCallback(BoolAction<KeyCode, KeyMask, VoiceControlDeviceInformation> processKey)
+ public static void SetProcessKeyCallback(BoolAction<KeyCode, KeyMask, InputMethodDeviceInformation> processKey)
{
_imeProcessKeyDelegate = (KeyCode keyCode, KeyMask keyMask, IntPtr devInfo, IntPtr userData) =>
{
- return _processKeyDelagate(keyCode, keyMask, new VoiceControlDeviceInformation(devInfo));
+ return _processKeyDelagate(keyCode, keyMask, new InputMethodDeviceInformation(devInfo));
};
ErrorCode error = ImeEventSetProcessKeyEventCb(_imeProcessKeyDelegate, IntPtr.Zero);
if (error != ErrorCode.None)
throw InputMethodExceptionFactory.CreateException(error);
}
}
-
- /// <summary>
- /// Requests to create an option window from the input panel.
- /// The input panel can call this function to open the option window. This function calls OptionWindowCreated Event with OptionWindowType.Keyboard.
- /// </summary>
- /// <privilege>
- /// http://tizen.org/privilege/ime
- /// </privilege>
- /// <exception cref="InvalidOperationException">
- /// This can occur due to the following reasons:
- /// 1) The application does not have the privilege to call this function
- /// 2) Operation failed
- /// 3) IME main loop isn't started yet
- /// 4) OptionWindowCreated event has not been set
- /// </exception>
- /// <precondition>
- /// OptionWindowCreated and OptionWindowDestroyed event should be set
- /// </precondition>
- public static void CreateOptionWindow()
- {
- ErrorCode error = ImeCreateOptionWindow();
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "CreapteOptionWindow Failed with error " + error);
- throw InputMethodExceptionFactory.CreateException(error);
- }
- }
-
- /// <summary>
- /// Requests to destroy an option window.
- /// The input panel can call this function to close the option window which is created from either the input panel or Settings application.
- /// </summary>
- /// <privilege>
- /// http://tizen.org/privilege/ime
- /// </privilege>
- /// <param name="window">The option window to destroy</param>
- /// <exception cref="InvalidOperationException">
- /// This can occur due to the following reasons:
- /// 1) The application does not have the privilege to call this function
- /// 2) Invalid Parameter
- /// 3) IME main loop isn't started yet
- /// </exception>
- /// <precondition>
- /// OptionWindowDestroyed Event must be set.
- /// </precondition>
- /// <postcondition>
- /// This function triggers the OptionWindowDestroyed Event if it is set.
- /// </postcondition>
- public static void DestroyOptionWindow(OptionWindow window)
- {
- ErrorCode error = ImeDestroyOptionWindow(window);
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "DestroyOptionWindow Failed with error " + error);
- throw InputMethodExceptionFactory.CreateException(error);
- }
- }
}
}
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* 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.
-*/
-
-using Tizen;
-using System;
-using ElmSharp;
-using static Interop.InputMethod;
-
-namespace Tizen.Uix.InputMethod
-{
- /// <summary>
- /// Option window Class
- /// </summary>
- public class OptionWindow : Window
- {
- internal static IntPtr _handle = IntPtr.Zero;
- private IntPtr _realHandle = IntPtr.Zero;
-
- internal OptionWindow():base("Option")
- {
- _realHandle = _handle;
- }
-
- protected override IntPtr CreateHandle(EvasObject parent)
- {
- return _handle;
- }
-
- /// <summary>
- /// The type of option window
- /// </summary>
- public OptionWindowType Type
- {
- get;
- internal set;
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* 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.
-*/
-
-namespace Tizen.Uix.InputMethod
-{
- /// <summary>
- /// Enumeration of the option window type.
- /// </summary>
- public enum OptionWindowType
- {
- /// <summary>
- /// Open from Keyboard
- /// </summary>
- Keyboard,
- /// <summary>
- /// Open from Setting application
- /// </summary>
- SettingApplication
- };
-
- /// <summary>
- /// This class contains information related to OptionWindowCreated event
- /// </summary>
- public class OptionWindowCreatedEventArgs
- {
- internal OptionWindowCreatedEventArgs(OptionWindow window, OptionWindowType type)
- {
- Window = window;
- Window.Type = type;
- }
-
- /// <summary>
- /// The created window object
- /// </summary>
- public OptionWindow Window
- {
- get;
- internal set;
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* 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.
-*/
-
-namespace Tizen.Uix.InputMethod
-{
- /// <summary>
- /// This class contains information related to the OptionWindowDestroyed event
- /// </summary>
- public class OptionWindowDestroyedEventArgs
- {
- internal OptionWindowDestroyedEventArgs(OptionWindow window)
- {
- Window = window;
- }
-
- /// <summary>
- /// The window object to destroy
- /// </summary>
- public OptionWindow Window
- {
- get;
- internal set;
- }
- }
-}
\ No newline at end of file