/// <summary> /// Gets recently used stickers list. /// The most recently used stickers are delivered in order. /// </summary> /// <since_tizen> 10 </since_tizen> /// <feature>http://tizen.org/feature/ui_service.sticker</feature> /// <param name="count">The number of stickers that you want to receive.</param> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="ArgumentException">This exception can be due to an invalid parameter.</exception> /// <exception cref="InvalidOperationException">This exception can be due to operation failed.</exception> public static IEnumerable <StickerData> GetRecentStickers(int count) { var stickers = new List <StickerData>(); StickerConsumerDataForeachCallback _dataForeachDelegate = (IntPtr stickerData, IntPtr userData) => { StickerData data = new StickerData(stickerData); stickers.Add(data); }; ErrorCode error = StickerConsumerGetRecentDataList(_handle, count, out var result, _dataForeachDelegate, IntPtr.Zero); if (error != ErrorCode.None) { Log.Error(LogTag, "GetRecentStickers Failed with error " + error); throw ExceptionFactory.CreateException(error); } return(stickers); }
internal static extern ErrorCode StickerConsumerDataForeachByDisplayType(IntPtr stickerConsumer, int offset, int count, out int result, DisplayType type, StickerConsumerDataForeachCallback callback, IntPtr userData);
internal static extern ErrorCode StickerConsumerGetRecentDataList(IntPtr stickerConsumer, int count, out int result, StickerConsumerDataForeachCallback callback, IntPtr userData);
internal static extern ErrorCode StickerConsumerDataForeachByGroup(IntPtr stickerConsumer, int offset, int count, out int result, string group, StickerConsumerDataForeachCallback callback, IntPtr userData);