+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{657E0754-FAF0-42B9-B9F5-45868826758E}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ElmSharp</RootNamespace>
- <AssemblyName>ElmSharp</AssemblyName>
- <FileAlignment>512</FileAlignment>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Debug\Net45\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\Net45\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
- <PropertyGroup>
- <AssemblyOriginatorKeyFile>ElmSharp.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Net.Http" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ElmSharp\Background.cs" />
- <Compile Include="ElmSharp\Box.cs" />
- <Compile Include="ElmSharp\Button.cs" />
- <Compile Include="ElmSharp\Calendar.cs" />
- <Compile Include="ElmSharp\Check.cs" />
- <Compile Include="ElmSharp\CheckStateChangedEventArgs.cs" />
- <Compile Include="ElmSharp\Color.cs" />
- <Compile Include="ElmSharp\ColorChangedEventArgs.cs" />
- <Compile Include="ElmSharp\ColorSelector.cs" />
- <Compile Include="ElmSharp\Conformant.cs" />
- <Compile Include="ElmSharp\Container.cs" />
- <Compile Include="ElmSharp\ContextPopup.cs" />
- <Compile Include="ElmSharp\ColorSelectorItem.cs" />
- <Compile Include="ElmSharp\ContextPopupItem.cs" />
- <Compile Include="ElmSharp\DateChangedEventArgs.cs" />
- <Compile Include="ElmSharp\DateTimeSelector.cs" />
- <Compile Include="ElmSharp\DisplayedMonthChangedEventArgs.cs" />
- <Compile Include="ElmSharp\EcoreAnimator.cs" />
- <Compile Include="ElmSharp\EcoreMainloop.cs" />
- <Compile Include="ElmSharp\EcoreSynchronizationContext.cs" />
- <Compile Include="ElmSharp\EdjeObject.cs" />
- <Compile Include="ElmSharp\ElmScrollConfig.cs" />
- <Compile Include="ElmSharp\Elementary.cs" />
- <Compile Include="ElmSharp\Entry.cs" />
- <Compile Include="ElmSharp\EvasKeyEventArgs.cs" />
- <Compile Include="ElmSharp\EvasMap.cs" />
- <Compile Include="ElmSharp\EvasObject.cs" />
- <Compile Include="ElmSharp\EvasObjectEvent.cs" />
- <Compile Include="ElmSharp\FlipSelector.cs" />
- <Compile Include="ElmSharp\FlipSelectorItem.cs" />
- <Compile Include="ElmSharp\FloatingButton.cs" />
- <Compile Include="ElmSharp\GenGrid.cs" />
- <Compile Include="ElmSharp\GenGridItem.cs" />
- <Compile Include="ElmSharp\GenItem.cs" />
- <Compile Include="ElmSharp\GenItemClass.cs" />
- <Compile Include="ElmSharp\GenList.cs" />
- <Compile Include="ElmSharp\GenListItem.cs" />
- <Compile Include="ElmSharp\GestureLayer.cs" />
- <Compile Include="ElmSharp\Icon.cs" />
- <Compile Include="ElmSharp\Image.cs" />
- <Compile Include="ElmSharp\Index.cs" />
- <Compile Include="ElmSharp\IndexItem.cs" />
- <Compile Include="ElmSharp\ItemObject.cs" />
- <Compile Include="ElmSharp\Label.cs" />
- <Compile Include="ElmSharp\Layout.cs" />
- <Compile Include="ElmSharp\List.cs" />
- <Compile Include="ElmSharp\ListItem.cs" />
- <Compile Include="ElmSharp\Naviframe.cs" />
- <Compile Include="ElmSharp\NaviItem.cs" />
- <Compile Include="ElmSharp\Panel.cs" />
- <Compile Include="ElmSharp\Panes.cs" />
- <Compile Include="ElmSharp\Point.cs" />
- <Compile Include="ElmSharp\Point3D.cs" />
- <Compile Include="ElmSharp\Polygon.cs" />
- <Compile Include="ElmSharp\Popup.cs" />
- <Compile Include="ElmSharp\PopupItem.cs" />
- <Compile Include="ElmSharp\ProgressBar.cs" />
- <Compile Include="ElmSharp\Radio.cs" />
- <Compile Include="ElmSharp\Rect.cs" />
- <Compile Include="ElmSharp\Rectangle.cs" />
- <Compile Include="ElmSharp\Scroller.cs" />
- <Compile Include="ElmSharp\Size.cs" />
- <Compile Include="ElmSharp\Slider.cs" />
- <Compile Include="ElmSharp\SmartEvent.cs" />
- <Compile Include="ElmSharp\Spinner.cs" />
- <Compile Include="ElmSharp\Table.cs" />
- <Compile Include="ElmSharp\Toolbar.cs" />
- <Compile Include="ElmSharp\ToolbarItem.cs" />
- <Compile Include="ElmSharp\Widget.cs" />
- <Compile Include="ElmSharp\Window.cs" />
- <Compile Include="ElmSharp\WrapType.cs" />
- <Compile Include="Interop\Interop.Eina.cs" />
- <Compile Include="Interop\Interop.Elementary.FlipSelector.cs" />
- <Compile Include="Interop\Interop.Eo.cs" />
- <Compile Include="Interop\Interop.Ecore.cs" />
- <Compile Include="Interop\Interop.Elementary.Bg.cs" />
- <Compile Include="Interop\Interop.Elementary.Box.cs" />
- <Compile Include="Interop\Interop.Elementary.Button.cs" />
- <Compile Include="Interop\Interop.Elementary.CalendarView.cs" />
- <Compile Include="Interop\Interop.Elementary.ColorPicker.cs" />
- <Compile Include="Interop\Interop.Elementary.cs" />
- <Compile Include="Interop\Interop.Elementary.CtxPopup.cs" />
- <Compile Include="Interop\Interop.Elementary.DateTimePicker.cs" />
- <Compile Include="Interop\Interop.Elementary.Entry.cs" />
- <Compile Include="Interop\Interop.Elementary.FloatingButton.cs" />
- <Compile Include="Interop\Interop.Elementary.GenGridView.cs" />
- <Compile Include="Interop\Interop.Elementary.GenListView.cs" />
- <Compile Include="Interop\Interop.Elementary.GestureLayer.cs" />
- <Compile Include="Interop\Interop.Elementary.Image.cs" />
- <Compile Include="Interop\Interop.Elementary.Index.cs" />
- <Compile Include="Interop\Interop.Elementary.Label.cs" />
- <Compile Include="Interop\Interop.Elementary.List.cs" />
- <Compile Include="Interop\Interop.Elementary.Naviframe.cs" />
- <Compile Include="Interop\Interop.Elementary.Panel.cs" />
- <Compile Include="Interop\Interop.Elementary.Panes.cs" />
- <Compile Include="Interop\Interop.Elementary.Popup.cs" />
- <Compile Include="Interop\Interop.Elementary.ProgressBar.cs" />
- <Compile Include="Interop\Interop.Elementary.ScrollView.cs" />
- <Compile Include="Interop\Interop.Elementary.Slider.cs" />
- <Compile Include="Interop\Interop.Elementary.Spinner.cs" />
- <Compile Include="Interop\Interop.Elementary.Table.cs" />
- <Compile Include="Interop\Interop.Elementary.Toolbar.cs" />
- <Compile Include="Interop\Interop.Elementary.Win.cs" />
- <Compile Include="Interop\Interop.Evas.cs" />
- <Compile Include="Interop\Interop.Evas.Image.cs" />
- <Compile Include="Interop\Interop.Libc.cs" />
- <Compile Include="Interop\Interop.Libraries.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ElmSharp.Net45.project.json" />
- <None Include="ElmSharp.nuspec" />
- <None Include="ElmSharp.snk" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
case GestureType.LongTap:
case GestureType.DoubleTap:
case GestureType.TripleTap:
- action(Marshal.PtrToStructure(event_info, typeof(TapData)));
+ action(Marshal.PtrToStructure<TapData>(event_info));
break;
case GestureType.Momentum:
- action(Marshal.PtrToStructure(event_info, typeof(MomentumData)));
+ action(Marshal.PtrToStructure<MomentumData>(event_info));
break;
case GestureType.Line:
case GestureType.Flick:
- action(Marshal.PtrToStructure(event_info, typeof(LineData)));
+ action(Marshal.PtrToStructure<LineData>(event_info));
break;
case GestureType.Zoom:
- action(Marshal.PtrToStructure(event_info, typeof(ZoomData)));
+ action(Marshal.PtrToStructure<ZoomData>(event_info));
break;
case GestureType.Rotate:
- action(Marshal.PtrToStructure(event_info, typeof(RotateData)));
+ action(Marshal.PtrToStructure<RotateData>(event_info));
break;
}
}
/// </summary>
public Int32 Y;
- #pragma warning disable 3003
+#pragma warning disable 3003
/// <summary>
/// The number of fingers tapped.
/// </summary>
/// The timestamp.
/// </summary>
public UInt32 Timestamp;
- #pragma warning restore 3003
+#pragma warning restore 3003
}
[StructLayout(LayoutKind.Sequential)]
/// </summary>
public Int32 Y2;
- #pragma warning disable 3003
+#pragma warning disable 3003
/// <summary>
/// Timestamp of start of final x-swipe.
/// </summary>
/// Number of fingers.
/// </summary>
public UInt32 FingersCount;
- #pragma warning restore 3003
+#pragma warning restore 3003
}
[StructLayout(LayoutKind.Sequential)]
/// </summary>
public Int32 Y2;
- #pragma warning disable 3003
+#pragma warning disable 3003
/// <summary>
/// Timestamp of start of final x-swipe.
/// </summary>
/// Number of fingers.
/// </summary>
public UInt32 FingersCount;
- #pragma warning restore 3003
+#pragma warning restore 3003
/// <summary>
/// Angle (direction) of lines.
{
public static double DefaultLongTapTimeout
{
- get {
+ get
+ {
return Interop.Elementary.elm_config_glayer_long_tap_start_timeout_get();
}
- set {
+ set
+ {
Interop.Elementary.elm_config_glayer_long_tap_start_timeout_set(value);
}
}
public static double DefaultDoubleTapTimeout
{
- get {
+ get
+ {
return Interop.Elementary.elm_config_glayer_double_tap_timeout_get();
}
- set {
+ set
+ {
Interop.Elementary.elm_config_glayer_double_tap_timeout_set(value);
}
}
* limitations under the License.
*/
-using System;
-using System.Linq;
-
namespace ElmSharp.Test
{
public class ScreenInformationTest : TestCaseBase
public override string TestName => "ScreenInformationTest";
public override string TestDescription => "To get screen information";
- Naviframe _navi;
- int _sequence = 0;
-
public override void Run(Window window)
{
Conformant conformant = new Conformant(window);
label2.Text = string.Format("<span color=#FFFFFF , font_size=50>ScreenDPI : xdpi : {0} ydpi : {1}", window.ScreenDpi.X, window.ScreenDpi.Y);
label2.Show();
box.PackEnd(label2);
- }
-
- EvasObject CreatePage(Window parent)
- {
- Box box = new Box(parent);
- box.Show();
-
- Label label = new Label(parent)
- {
- Text = string.Format("{0} Page", _sequence++),
- WeightX = 1,
- AlignmentX = -1,
- };
- Button push = new Button(parent)
- {
- Text = "Push",
- WeightX = 1,
- AlignmentX = -1,
- };
- Button pop = new Button(parent)
- {
- Text = "pop",
- WeightX = 1,
- AlignmentX = -1,
- };
-
- label.Show();
- push.Show();
- pop.Show();
-
- push.Clicked += (s, e) =>
- {
- _navi.Push(CreatePage(parent), string.Format("{0} Page", _sequence - 1));
- };
-
- pop.Clicked += (s, e) =>
- {
- var item = _navi.NavigationStack.LastOrDefault();
- int nativePointer = (int)(IntPtr)(item.Content);
- Console.WriteLine("----- Before Call _navi.Pop() {0:x} ", nativePointer);
- _navi.Pop();
- Console.WriteLine("----- After Call _navi.Pop() {0:x} ", nativePointer);
- };
-
- push.Resize(500, 100);
- pop.Resize(500, 100);
- label.Resize(500, 100);
- box.SetLayoutCallback(() =>
- {
- Console.WriteLine("Layout callback with : {0}", box.Geometry);
- var rect = box.Geometry;
- label.Move(rect.X, rect.Y);
- push.Move(rect.X, rect.Y + 100);
- pop.Move(rect.X, rect.Y + 200);
- });
-
- box.PackEnd(label);
- box.PackEnd(push);
- box.PackEnd(pop);
- return box;
- }
+ }
}
}