Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
[TimesSquare] Updated to latest available version in master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexsoto committed Apr 9, 2014
1 parent 0997550 commit c119dd8
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 37 deletions.
28 changes: 15 additions & 13 deletions TimesSquare/binding/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface TSQCalendarCell {
[Export ("calendar", ArgumentSemantic.Retain)]
NSCalendar Calendar { get; set; }

[Export ("calendarView")]
[Export ("calendarView", ArgumentSemantic.Assign)]
TSQCalendarView CalendarView { get; set; }

[Static]
Expand Down Expand Up @@ -61,16 +61,16 @@ interface TSQCalendarRowCell {
[Export ("initWithCalendar:reuseIdentifier:")]
IntPtr Constructor (NSCalendar calendar, string reuseIdentifier);

[Export ("backgroundImage")]
[Export ("backgroundImage", ArgumentSemantic.Assign)]
UIImage BackgroundImage { get; }

[Export ("selectedBackgroundImage")]
[Export ("selectedBackgroundImage", ArgumentSemantic.Assign)]
UIImage SelectedBackgroundImage { get; }

[Export ("todayBackgroundImage")]
[Export ("todayBackgroundImage", ArgumentSemantic.Assign)]
UIImage TodayBackgroundImage { get; }

[Export ("notThisMonthBackgroundImage")]
[Export ("notThisMonthBackgroundImage", ArgumentSemantic.Assign)]
UIImage NotThisMonthBackgroundImage { get; }

[Export ("beginningDate", ArgumentSemantic.Retain)]
Expand All @@ -84,7 +84,7 @@ interface TSQCalendarRowCell {
}

[BaseType (typeof (UIView),
Delegates=new string [] {"WeakDelegate"},
Delegates=new string [] {"Delegate"},
Events=new Type [] { typeof (TSQCalendarViewDelegate) })]
interface TSQCalendarView {

Expand All @@ -102,12 +102,9 @@ interface TSQCalendarView {

[Export ("calendar", ArgumentSemantic.Retain)]
NSCalendar Calendar { get; set; }

[Wrap ("WeakDelegate")][NullAllowed]
TSQCalendarViewDelegate Delegate { get; set; }

[Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
NSObject WeakDelegate { get; set; }
ITSQCalendarViewDelegate Delegate { get; set; }

[Export ("pinsHeaderToTop")]
bool PinsHeaderToTop { get; set; }
Expand All @@ -121,19 +118,24 @@ interface TSQCalendarView {
[Export ("contentOffset")]
PointF ContentOffset { get; set; }

[Export ("headerCellClass", ArgumentSemantic.Retain)]
[Export ("headerCellClass")]
Class HeaderCellClass { get; set; }

[Export ("rowCellClass", ArgumentSemantic.Retain)]
[Export ("rowCellClass")]
Class RowCellClass { get; set; }

[Export ("scrollToDate:animated:")]
void ScrollToDate (NSDate date, bool animated);
}

interface ITSQCalendarViewDelegate { }

[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface TSQCalendarViewDelegate {

[Export ("calendarView:shouldSelectDate:"), DelegateName ("TSQCalendarViewDelegateS"), DefaultValue (true)]
[Export ("calendarView:shouldSelectDate:"), DelegateName ("TSQCalendarViewDelegateS"), NoDefaultValue]
bool ShouldSelectDate (TSQCalendarView calendarView, NSDate date);

[Export ("calendarView:didSelectDate:"), EventArgs("TSQCalendarViewDelegateA")]
Expand Down
4 changes: 0 additions & 4 deletions TimesSquare/binding/AssemblyInfo.cs

This file was deleted.

13 changes: 9 additions & 4 deletions TimesSquare/binding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PROJECT=$(PROJECT_ROOT)/TimesSquare.xcodeproj
TARGET=TimesSquare
BTOUCH=/Developer/MonoTouch/usr/bin/btouch
SMCS=/Developer/MonoTouch/usr/bin/smcs
MONOXBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild

all: TimesSquare.iOS.dll

Expand All @@ -22,13 +23,17 @@ libTimesSquare-armv7s.a: objc-TimesSquare-master
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7s -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphoneos/libTimesSquare.a $@

libTimesSquare.a: libTimesSquare-i386.a libTimesSquare-armv7.a libTimesSquare-armv7s.a
libTimesSquare-arm64.a: objc-TimesSquare-master
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch arm64 -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphoneos/libTimesSquare.a $@

libTimesSquare.a: libTimesSquare-i386.a libTimesSquare-armv7.a libTimesSquare-armv7s.a libTimesSquare-arm64.a
lipo -create -output $@ $^

TimesSquare.iOS.dll: ApiDefinition.cs StructsAndEnums.cs Makefile AssemblyInfo.cs libTimesSquare.a
TimesSquare.iOS.dll: ApiDefinition.cs StructsAndEnums.cs Makefile libTimesSquare.a
-mkdir -p ios
$(BTOUCH) -unsafe -d:DEBUG ApiDefinition.cs -s:StructsAndEnums.cs -tmpdir:ios -sourceonly:ios/sources.list
$(SMCS) -noconfig -debug+ -debug:full -optimize- -out:TimesSquare.iOS.dll -resource:libTimesSquare.a AssemblyInfo.cs StructsAndEnums.cs @ios/sources.list -target:library -unsafe+ -define:DEBUG -reference:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll -reference:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll -reference:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll
$(MONOXBUILD) /p:Configuration=Release TimesSquare.iOS.csproj
cp bin/Release/TimesSquare.iOS.dll TimesSquare.iOS.dll

clean:
-rm -rf list ios objc-TimesSquare *.a *dll *.mdb
57 changes: 57 additions & 0 deletions TimesSquare/binding/TimesSquare.iOS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D7AEFBBB-92D4-4425-8671-9BD1FD4156DA}</ProjectGuid>
<ProjectTypeGuids>{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>TimesSquare.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>TimesSquare.iOS</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="monotouch" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Xamarin.ObjcBinding.CSharp.targets" />
<ItemGroup>
<ObjcBindingNativeLibrary Include="libTimesSquare.a" />
</ItemGroup>
<ItemGroup>
<Compile Include="libTimesSquare.linkwith.cs">
<DependentUpon>libTimesSquare.a</DependentUpon>
</Compile>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions TimesSquare/binding/libTimesSquare.linkwith.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;

[assembly: LinkerSafe]
[assembly: LinkWith ("libTimesSquare.a", LinkTarget.Simulator | LinkTarget.ArmV7 | LinkTarget.ArmV7s, Frameworks = "CoreGraphics", LinkerFlags = "-ObjC -fobjc-arc", SmartLink = true, ForceLoad = true)]
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>True</MtouchProfiling>
<ConsolePause>False</ConsolePause>
<MtouchDebug>True</MtouchDebug>
<MtouchExtraArgs>--registrar:static</MtouchExtraArgs>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
Expand Down Expand Up @@ -97,22 +100,21 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Content Include="Default-568h%402x.png" />
<Content Include="Default.png" />
<Content Include="Default%402x.png" />
<Content Include="images\CalendarPreviousMonth.png" />
<Content Include="images\CalendarPreviousMonth%402x.png" />
<Content Include="images\CalendarRow.png" />
<Content Include="images\CalendarRow%402x.png" />
<Content Include="images\CalendarRowBottom.png" />
<Content Include="images\CalendarRowBottom%402x.png" />
<Content Include="images\CalendarSelectedDate.png" />
<Content Include="images\CalendarSelectedDate%402x.png" />
<Content Include="images\CalendarTodaysDate.png" />
<Content Include="images\CalendarTodaysDate%402x.png" />
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<Folder Include="images\" />
<Folder Include="Resources\" />
<BundleResource Include="Resources\Default.png" />
<BundleResource Include="Resources\Default%402x.png" />
<BundleResource Include="Resources\Default-568h%402x.png" />
<BundleResource Include="Resources\images\CalendarPreviousMonth.png" />
<BundleResource Include="Resources\images\CalendarPreviousMonth%402x.png" />
<BundleResource Include="Resources\images\CalendarRow.png" />
<BundleResource Include="Resources\images\CalendarRow%402x.png" />
<BundleResource Include="Resources\images\CalendarRowBottom.png" />
<BundleResource Include="Resources\images\CalendarRowBottom%402x.png" />
<BundleResource Include="Resources\images\CalendarSelectedDate.png" />
<BundleResource Include="Resources\images\CalendarSelectedDate%402x.png" />
<BundleResource Include="Resources\images\CalendarTodaysDate.png" />
<BundleResource Include="Resources\images\CalendarTodaysDate%402x.png" />
</ItemGroup>
</Project>

0 comments on commit c119dd8

Please sign in to comment.