# Auto-generated from csapi-tizenfx.spec.in by makespec.sh
%define TIZEN_NET_API_VERSION 11
-%define TIZEN_NET_RPM_VERSION 11.0.0.17809+nui22223
-%define TIZEN_NET_NUGET_VERSION 11.0.0.17809
+%define TIZEN_NET_RPM_VERSION 11.0.0.999+nui22224
+%define TIZEN_NET_NUGET_VERSION 11.0.0.99999
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
NUGET_VERSION=11.0.0.99999
# RPM Version Suffix
-RPM_VERSION_SUFFIX=nui22223
+RPM_VERSION_SUFFIX=nui22224
}
Sql sql = new Sql(string.Format("SELECT * from {0} WHERE rowid = {1}", table_name, rowid));
- IRecord record = CreateStatement().ExecuteQuery(sql).FirstOrDefault();
-
- RecordChangedEventArgs ev = new RecordChangedEventArgs(operationType, db_name, table_name, record);
- _recordChanged?.Invoke(this, ev);
+ using (IStatement stmt = CreateStatement())
+ {
+ IRecord record = stmt.ExecuteQuery(sql).FirstOrDefault();
+ RecordChangedEventArgs ev = new RecordChangedEventArgs(operationType, db_name, table_name, record);
+ _recordChanged?.Invoke(this, ev);
+ }
}
internal IntPtr GetHandle()
if (pos == 0)
throw new InvalidOperationException("Invalid binding");
- if (typeof(int) == obj.GetType())
+ // TODO: consider null binding
+ if (obj == null)
+ continue;
+
+ Type type = obj.GetType();
+ if (typeof(int) == type)
{
Interop.Sqlite.BindInt(_stmt, pos, (int)obj);
}
- else if (typeof(bool) == obj.GetType())
+ else if (typeof(bool) == type)
{
bool val = (bool)obj;
Interop.Sqlite.BindInt(_stmt, pos, val ? 1 : 0);
}
- else if (typeof(double) == obj.GetType())
+ else if (typeof(double) == type)
{
Interop.Sqlite.BindDouble(_stmt, pos, (double)obj);
}
- else if (typeof(string) == obj.GetType())
+ else if (typeof(string) == type)
{
Interop.Sqlite.BindText(_stmt, pos, (string)obj, -1, (IntPtr)(-1));
}
- else if (typeof(byte[]) == obj.GetType())
+ else if (typeof(byte[]) == type)
{
- if (obj != null)
- Interop.Sqlite.BindData(_stmt, pos, (byte[])obj, ((byte[])obj).Length, IntPtr.Zero);
+ Interop.Sqlite.BindData(_stmt, pos, (byte[])obj, ((byte[])obj).Length, IntPtr.Zero);
}
}
}
while (!failed &&
- Source.IsHeader(firstIndex) ||
+ (Source.IsHeader(firstIndex) ||
Source.IsGroupHeader(firstIndex) ||
- Source.IsGroupFooter(firstIndex))
+ Source.IsGroupFooter(firstIndex)))
{
if (Source.IsFooter(firstIndex)
|| ((Source.Count - 1) <= firstIndex))
}
while (!failed &&
- Source.IsHeader(firstIndex) ||
+ (Source.IsHeader(firstIndex) ||
Source.IsGroupHeader(firstIndex) ||
- Source.IsGroupFooter(firstIndex))
+ Source.IsGroupFooter(firstIndex)))
{
if (Source.IsFooter(firstIndex)
|| ((Source.Count - 1) <= firstIndex))
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
+
+ /// <summary>
+ /// Generate URI from current buffer.
+ /// </summary>
+ /// <param name="pixelFormat">The pixel format for this frame buffer</param>
+ /// <param name="width">The width for this frame buffer</param>
+ /// <param name="height">The height for this frame buffer</param>
+ public ImageUrl GenerateUrl(PixelFormat pixelFormat, int width, int height)
+ {
+ return new ImageUrl(Interop.FrameBuffer.GenerateUrl(this.SwigCPtr.Handle, (int)pixelFormat, width, height), true);
+ }
}
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_Clear")]
public static extern void Clear(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_SetLoopingMode")]
+ public static extern void SetLoopingMode(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_GetLoopingMode")]
+ public static extern int GetLoopingMode(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_SetProgressNotification")]
public static extern void SetProgressNotification(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_FrameBuffer_SWIGUpcast")]
public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_FrameBuffer_GenerateUrl")]
+ public static extern global::System.IntPtr GenerateUrl(global::System.IntPtr frameBuffer, int pixelFormat, int width, int height);
}
}
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_ImageView_Property_PIXEL_AREA_get")]
public static extern int PixelAreaGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_ImageView_Property_PLACEHOLDER_IMAGE_get")]
+ public static extern int PlaceHolderImageGet();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_ImageView_Property_TRANSITION_EFFECT_get")]
+ public static extern int TransitionEffectGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_ImageView_Property")]
public static extern global::System.IntPtr NewImageViewProperty();
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetLastTouchEvent")]
public static extern global::System.IntPtr GetLastTouchEvent(global::System.Runtime.InteropServices.HandleRef window);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_InternalRetrievingLastKeyEvent")]
+ public static extern void InternalRetrievingLastKeyEvent(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef key);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_InternalRetrievingLastTouchEvent")]
+ public static extern void InternalRetrievingLastTouchEvent(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef touch);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetNeedsRotationCompletedAcknowledgement")]
public static extern void SetNeedsRotationCompletedAcknowledgement(global::System.Runtime.InteropServices.HandleRef window, bool needAcknowledgement);
}
/// <summary>
+ /// Enumeration for what looping mode is in.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")]
+ public enum LoopingModes
+ {
+ /// <summary>
+ /// When the animation arrives at the end in looping mode, the animation restarts from the beginning. (Default)
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Restart,
+ /// <summary>
+ /// When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ AutoReverse
+ }
+
+ /// <summary>
/// Gets or sets the duration in milliseconds of the animation.
/// This duration is applied to the animations are added after the Duration is set.
/// </summary>
}
/// <summary>
+ /// Enumeration for what looping mode is in.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public LoopingModes LoopingMode
+ {
+ set
+ {
+ Interop.Animation.SetLoopingMode(SwigCPtr, (int)value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ Animation.LoopingModes ret = (Animation.LoopingModes)Interop.Animation.GetLoopingMode(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
+ return ret;
+ }
+ }
+
+ /// <summary>
/// Gets or sets the properties of the animation.
/// </summary>
//ToDo : will raise deprecated-ACR, [Obsolete("Deprecated in API9, will be removed in API11, Use PropertyList instead")]
}
private bool adjustViewSize = false;
+ /// <summary>
+ /// ImageView PlaceHolderUrl, type string.
+ /// This is one of mandatory property. Even if not set or null set, it sets empty string ("") internally.
+ /// When it is set as null, it gives empty string ("") to be read.
+ /// </summary>
+ /// <since_tizen> 11 </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string PlaceHolderUrl
+ {
+ get
+ {
+ return (string)GetValue(PlaceHolderUrlProperty);
+ }
+ set
+ {
+ SetValue(PlaceHolderUrlProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets whether the image use TransitionEffect or not<br />
+ /// </summary>
+ /// <since_tizen> 11 </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool TransitionEffect
+ {
+ get
+ {
+ return (bool)GetValue(TransitionEffectProperty);
+ }
+ set
+ {
+ SetValue(TransitionEffectProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
internal Selector<string> ResourceUrlSelector
{
get => GetSelector<string>(resourceUrlSelector, ImageView.ResourceUrlProperty);
internal static readonly int IMAGE = Interop.ImageView.ImageGet();
internal static readonly int PreMultipliedAlpha = Interop.ImageView.PreMultipliedAlphaGet();
internal static readonly int PixelArea = Interop.ImageView.PixelAreaGet();
+ internal static readonly int PlaceHolderUrl = Interop.ImageView.PlaceHolderImageGet();
+ internal static readonly int TransitionEffect = Interop.ImageView.TransitionEffectGet();
}
private enum ImageType
var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
return instance.adjustViewSize;
});
+
+ /// <summary>
+ /// PlaceHolderUrlProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PlaceHolderUrlProperty = BindableProperty.Create(nameof(PlaceHolderUrl), typeof(string), typeof(ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ Object.InternalSetPropertyString(imageView.SwigCPtr, ImageView.Property.PlaceHolderUrl, (string)newValue );
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var imageView = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return Object.InternalGetPropertyString(imageView.SwigCPtr, ImageView.Property.PlaceHolderUrl);
+ });
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TransitionEffectProperty = BindableProperty.Create(nameof(TransitionEffect), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ Object.InternalSetPropertyBool(imageView.SwigCPtr, ImageView.Property.TransitionEffect, (bool)newValue);
+ }
+ },
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ return Object.InternalGetPropertyBool(imageView.SwigCPtr, ImageView.Property.TransitionEffect);
+ }));
}
}
private string windowTitle;
private List<Layer> childLayers = new List<Layer>();
private LayoutController localController;
+ private Key internalLastKeyEvent;
+ private Touch internalLastTouchEvent;
static internal bool IsSupportedMultiWindow()
{
[EditorBrowsable(EditorBrowsableState.Never)]
public Key GetLastKeyEvent()
{
- Key ret = new Key(Interop.Window.GetLastKeyEvent(SwigCPtr), false);
+ if(internalLastKeyEvent == null)
+ {
+ internalLastKeyEvent = new Key();
+ }
+ Interop.Window.InternalRetrievingLastKeyEvent(SwigCPtr, internalLastKeyEvent.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return internalLastKeyEvent;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Touch GetLastTouchEvent()
{
- Touch ret = new Touch(Interop.Window.GetLastTouchEvent(SwigCPtr), false);
+ if(internalLastTouchEvent == null)
+ {
+ internalLastTouchEvent = new Touch();
+ }
+ Interop.Window.InternalRetrievingLastTouchEvent(SwigCPtr, internalLastTouchEvent.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return internalLastTouchEvent;
}
/// <summary>
childLayers.Clear();
localController?.Dispose();
+
+ internalLastKeyEvent?.Dispose();
+ internalLastKeyEvent = null;
+ internalLastTouchEvent?.Dispose();
+ internalLastTouchEvent = null;
}
--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * 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.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ using log = Tizen.Log;
+ public class PlaceHolderImageSample : IExample
+ {
+ private const string tag = "NUITEST";
+ private Window mainWin;
+ private ImageView[] imageViews = null;
+ const int imageWidth = 500;
+ const int imageHeight = 500;
+ const int imageMax = 6;
+ Timer mTimer;
+ int image_count = 0;
+
+ private static string[] url = new string[]
+ {
+ "https://images.pexels.com/photos/16027424/pexels-photo-16027424.jpeg",
+ "https://images.pexels.com/photos/214574/pexels-photo-214574.jpeg",
+ "https://images.pexels.com/photos/39853/woman-girl-freedom-happy-39853.jpeg",
+ "https://images.pexels.com/photos/842711/pexels-photo-842711.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
+ "https://images.pexels.com/photos/15828302/pexels-photo-15828302.jpeg",
+ "",
+ };
+
+ public void Activate()
+ {
+ Initialize();
+ }
+
+ public void Deactivate()
+ {
+ }
+
+ private void Initialize()
+ {
+ mainWin = NUIApplication.GetDefaultWindow();
+ mainWin.BackgroundColor = Color.White;
+ mainWin.WindowSize = new Size2D(1920,1080);
+ Size2D windowSize = new Size2D(mainWin.Size.Width,mainWin.Size.Height);
+
+ imageViews = new ImageView[imageMax];
+ for(int i=0; i<imageMax; i++)
+ {
+ int width = (i%(imageMax/2))*imageWidth;
+ int height = (i/(imageMax/2))*imageHeight;
+ imageViews[i] = new ImageView();
+ imageViews[i].Size2D = new Size2D(imageWidth, imageHeight);
+ imageViews[i].Position2D = new Position2D(width,height);
+ imageViews[i].ResourceUrl = url[i];
+ imageViews[i].PlaceHolderUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/placeholder_image.png";
+ imageViews[i].TransitionEffect = true;
+ mainWin.Add(imageViews[i]);
+ }
+
+ mTimer = new Timer(5000);
+ mTimer.Tick += ((object target, Timer.TickEventArgs args) =>
+ {
+ image_count++;
+ for(int i=0;i<imageMax;i++)
+ {
+ imageViews[i].ResourceUrl = url[(image_count+i)%imageMax];
+ }
+ return true;
+ });
+
+ mTimer.Start();
+ }
+ }
+}