WINDOWS10ANNIVERSARYUPDATESUPPORTINDELPHI
Marco Cantu, RAD Studio Product [email protected]: @marcocantu
AGENDA
§ Windows10,APIs,andUWP§ VCLFounda6onsRevisited
• What’snewintheVCLforWindows10§ UsingWinRTAPIsinDelphi§ BridgingWin32andWinRTwiththeWindowsDesktopBridge(akaCentennial)
§ What’sCookinginour“CentennialLab”
2
“
3
VCListhebestlibraryforWindowsdesktopdevelopmentandfullyembracesWindows10
4
WINDOWS10ThefastestgrowingversionofWindows
5
WINDOWS10,APIS,ANDUWP
§ Windows10isgePngfairlypopular• ButWindows7hass6llveryhighbusinessadop6on
§ Windows10includesthreecoreAPI• ClassicWindowsAPI(kernel,user,GDI,etc.)• WinRTAPI• Theaddi6onal.NETframeworklayer
§ UWPapps=UniversalWindowsPlaZormapps• IndicatesfirstclassWindows10applica6ons• GenerallyreservedforWinRTapps
VCL RTL
WINDOWSAPITIMELINE
1995
Windows NT 3.1
Win32
Interaction
WINDOWSAPITIMELINE
1995
Windows NT 3.1
2002 2007
Windows Vista
2012 2015
Windows XP
Win32.NET
VCLRTL
WINDOWSAPITIMELINE
1995
Windows NT 3.1
2002 2007
Windows Vista
2012
Windows 8
2015
Windows 10
Windows XP
Win32.NET
WinRTVCLRTL
Interaction
Interaction
Interaction
VCLFOUNDATIONSREVISITED
§ VCListhebestOOPcomponentlibraryencapsula6ngWinAPI• Microso^hasMFC,WinForms
§ VCLhasdeepandsmoothCOMintegra6on§ NowVCLhasfirstclasssupportforthenewWinRTAPI• CanmixandmatchwithWinAPIcode• UWP/WinRTsolu6onsrequireWin8/10,newcode
10
VCLANDWINDOWS10
WHAT’SNEWINTHEVCLFORWINDOWS10
§ Styling• Windows10specificstyles
§ NewVCLComponents• 5componentsintroducedin10Seadle• ImplementedinVCL,workalsoonWin7• LooklikeWinRTcounterparts,butnodependency
§ WinRTsupportandcomponents• RequireWin10
WINDOWS10VCLSTYLES
▪ TActivityIndicator in Vcl.WinXCtrls ▪ Similar to FMX TAniIndicator ▪ Customizable
• Three indicator types • Four sizes • Two colors • Adjustable frame delay
VCL ANIMATED ACTIVITY INDICATOR
▪ Controls position based on relative position
▪ Set position via ControlCollection▪ Find child control with IndexOf()▪ Or at design time use properties
• Align[xx]WithPanel:Boolean• Above:[Sibling]• Align[xx]With:[Sibling]• LeftOf:[Sibling]
VCL RELATIVE LAYOUT PANEL – TRELATIVEPANEL
http://docwiki.embarcadero.com/RADStudio/en/Using_the_Relative_Panel
▪ Includes search indicator ▪ Text and Audio indicators ▪ Has OnInvokeSearch event ▪ Used to manually search or filter
other controls
VCL SEARCHBOX - TSEARCHBOX
▪ Similar to FMX MultiView ▪ Adjustable behaviors,
placements and style ▪ Can contain any other
controls ▪ Animated expand and
collapse
VCL SPLIT VIEW – TSPLITVIEW
TSplitView
▪ Similar to FMX TSwitch ▪ Custom captions ▪ Custom colors ▪ Reizable elements ▪ Disabled and Read-Only ▪ PropertyState:tssOnortssOff▪ FunctionIsOn:Boolean
VCL TOGGLE SWITCH - TTOGGLESWITCH
WINDOWS RUNTIME IN TECH TERMS
▪ Anobject-orientedAPI▪ Asynchronous(noblocking>50ms)▪ COMbased
• Differenttypesystem,objectsconstruc6onandlife6memanagement
▪ Not.NET,notmanagedcode• ANa6veCodeAPI,compiledcode,noGC
THE RTL WINDOWS RUNTIME INTERFACE
▪ Helperseasecrea6onofobjects• Abstractsdealingwiththeclassfactories
▪ Over40newWinApi.*units▪ NewTWindowsStringtype
• Fornewna6veHStringtype▪ MuchlesscoderequiredtointerfacewithWinRTthanwithC#orMSVC++
WINDOWS RUNTIME API INTERFACES (MOSTLY FOUND IN SOURCE\RTL\WIN\WINRT FOLDER)
WinAPI.Applica6onModel.BackgroundWinAPI.Applica6onModel.CoreWinAPI.Applica6onModel.DataTransferWinAPI.Applica6onModelWinAPI.CommonTypesWinAPI.DataRTWinAPI.Devices.BluetoothWinAPI.Devices.Enumera6onWinAPI.DevicesWinAPI.Founda6on.Collec6onsWinAPI.Founda6onWinAPI.Founda6on.TypesWinAPI.GamingWinAPI.Globaliza6on
WinAPI.GraphicsRTWinAPI.ManagementWinAPI.MediaWinAPI.Networking.Connec6vityWinAPI.Networking.NetworkOperatorsWinAPI.NetworkingWinAPI.Networking.ProximityWinAPI.Networking.SocketsWinAPI.Networking.VpnWinAPI.Security.Creden6alsWinAPI.Security.CryptographyWinAPI.SecurityWinAPI.StorageWinAPI.Storage.Streams
WinAPI.SystemRTWinAPI.UI.Composi6onWinAPI.UI.CoreWinAPI.UI.Input.InkingWinAPI.UI.InputWinAPI.UI.No6fica6onsWinAPI.UIWinAPI.UI.TextWinAPI.UI.ViewManagementWinAPI.UI.WebUIWinAPI.UI.XamlWinAPI.WebRTSystem.Win.WinRT
LOW LEVEL WINRT CALLS
▪ ReferencedbyInterfaceforautoma6creferencecoun6ng
▪ HelperslikeTWindowsStringinSystem.Win.WinRTunit
▪ Manyclasseshavedefaultparameterlessconstructors▪ Use.Factorytoaccessotherconstructors▪ Use.Staticstoaccesssta6cmembersofclass
WINRTBASEDCOMPONENTS
§ ShareContracts• TSharingContract(VCL)• TShareContract(RTL)
§ No6fica6ons• hdp://community.embarcadero.com/blogs/entry/taskbar-
no6fica6on-badge-support-in-windows-10-anniversary-update
§ BluetoothLE• Star6ngwithBerlin10.1
23
WINDOWSDESKTOPBRIDGE(AKACENTENNIAL)
THEWINDOWSDESKTOPBRIDGE(AKACENTENNIAL)
§ The“bridge”packagesWin32/Win64applica6onsasUniversalWindowsPlaZormsapp• APPXinstalla6oninAnniversaryUpdate• WindowsStoregoingtobeopenedupsoon
§ Thetechnology:singleZIPfilewithen6redistribu6on,oneclickinstallanduninstall,filesystemandregistryvirtualiza6on• Mostlylikemobile,Mac
BUILDINGANAPPX
§ Packageappmakeappx.exe pack /f mapfile.txt /p myrssclient.appx
§ Signitwithyourcer6ficateSignTool.exe sign -f mctempcer.pfx -fd SHA256 -debug myrssclient.appx
§ Installcer6ficateonmachineCertutil -addStore TrustedPeople <testcert.cer>
§ EnableSideLoading(security,developers)
CROSSINGTHEBRIDGEORSTAYINGONIT?
§ Win8:verylimitedWinRTadop6on§ Microso^started“bridges”fordesktopandmobiletoincreaseappecosystem
§ Microso^tou6ngCentennialasamigra>onstep(abridgetogotoWinRT-land)• Microso^recommendedapparchitectureisdual:APPXshippingwithWin32+WinRTappcombined
WINDOWSSTORE
§ Distribu6ononWindowsstorelikelyagamechangerfortheplaZorm• Notimmediate,onlyWindows10Anniversaryclientswillbesupported
• Parallelenterprisedistribu6on• S6llnotavailable…tothepublic
28
WHAT’SCOMING
WHAT’SCOOKINGINOUR“UPDATE2LAB”
§ NewVCLCalendarcontrol• Addi6onalWinRTlook-alikecontrolimplementedinna6veVCL
§ IDE-basedWindowsStoredeploymentsupport• APPXgenera6on,likeformobileplaZorms• Packagesallassets,run6mepackages,DBDLLs…• WillrequireWin10SDKforpackagingandcodesigning
NEWCALENDARCONTROL
FURTHER,GENERALVCLPLANS
§ Addi6onalWin10look-alikeVCLcontrols• ButalsosomeextraVCLcontrols,notWin10related
§ (Unrelated)ImprovementsinVCLdesigners§ VCLQualityfocus
SUMMARY: VCL, FMX AND WINDOWS 10
▪ Microso^makingWin32/64firstclass,again▪ VCLremainsthebestWindowsclientlibrary• EnhancedwithWindows10UIcontrolsandWinRTAPIsandcomponents
• FireMonkeyalsoenjoysthissupport,morefocusedoncross-plaZormrequirements
▪ EmbarcaderocommidedtokeepDelphifocusedonthe(evolving)Windows10plaZorm
32
WHATABOUTGETTINGREADYBYBUYINGTODAY?
§ Special10%“Update1”discount*§ BuyDelphiProfessional,receiveMobileAdd-OnPackforfree*
§ BonuspackwithKonopkacontrols,RadiantShapes,ObjectPascalHandbook*
§ *Validun6lSeptember30th
34
THANKS!AnyquesJons?Youcanfindmeat:@[email protected]