Please RT Windows Runtime APIs Available to all
Please RT
Windows Runtime APIs �Available to all programming languages �Requires a language neutral type system Java. Script Windows Runtime C++ C#/VB 4
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
public ref class __int 64 sealed property __int 64 void __int 64 bool __int 64 return
var var new // true // false
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
public ref class sealed nullptr property return void
var // What is the value of ‘s’? null var // What is the value of ‘s’? var // What is the value of ‘s’
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
using namespace public ref class sealed property return void
b. my. Bounds = { x: 100, y: 200, width: 300, height: 400 } ; b. my. Bounds. width = 42; // What is the value of ‘width’? b. my. Bounds = { x: b. my. Bounds. x, y: b. my. Bounds. y, width: 42, height: b. my. Bounds. height }; var bounds = b. my. Bounds; bounds. width = 42; // What is the value of ‘b. my. Bounds. width’?
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
public ref class void sealed
var arr = { 1, 2, 3, 4, }; b. Array. Method (arr); // What is the value of arr[0]? b. Array. Method 2(arr); // What is the value of arr[0]?
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
public ref class Signaled. Event. Args sealed public delegate void Signaled. Event. Handler Object Signaled. Event. Args public ref class sealed event Signaled. Event. Handler^
var new b. add. Event. Listener ("Signaled", function () { … }); // What just happened? b. add. Event. Listener ("signaled", function () { … }); b. on. Signaled = function () { … }; // What just happened? b. onsignaled = function () { … };
Basic Types INT 32, UINT 64 Most basic types supported Strings HSTRING Avoids copying in multiple languages Structures struct Rect; Can contain strings, but not interfaces References IInspectable All classes, methods, properties and events are modeled using interfaces Simple Arrays INT 32 [] For very basic collections Events event T^ Signaled; Modeled as interface Collections IVector<T> Type-generic interfaces
public ref class sealed
var // What just happened?
C++ language extension summary The Windows Runtime Design
http: //forums. dev. windows. com http: //bldw. in/Session. Feedback
- Slides: 39