This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyActivity extends Activity { | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| } | |
| interface A1 {} | |
| interface A2 {} | |
| interface A3 {} | |
| interface A4 {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* The PKCS #7 container (the receipt) and the output of the verification. */ | |
| BIO *b_p7; | |
| PKCS7 *p7; | |
| /* The Apple root certificate, as raw data and in its OpenSSL representation. */ | |
| BIO *b_x509; | |
| X509 *Apple; | |
| /* The root certificate for chain-of-trust verification. */ | |
| X509_STORE *store = X509_STORE_new(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option 1, | |
| statements -> <Rule 11, tokens 1 .. 8> | |
| statement -> <Rule 2, tokens 1 .. 1> | |
| expression -> <Rule 343, tokens 1 .. 1> | |
| prefix_expression -> <Rule 347, tokens 1 .. 1> | |
| prefix_operator_opt -> <Rule 348, empty> | |
| postfix_expression -> <Rule 424, tokens 1 .. 1> | |
| primary_expression -> <Rule 362, tokens 1 .. 1> | |
| "ID" <tokens 1 .. 1> | |
| generic_argument_clause_opt -> <Rule 363, empty> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| static NSString * reuseIdentifier = @"cell"; | |
| MGSwipeTableCell * cell = [self.tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; | |
| if (!cell) { | |
| cell = [[MGSwipeTableCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier]; | |
| } | |
| cell.textLabel.text = @"Title"; | |
| cell.detailTextLabel.text = @"Description"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub trait VRDevice: Send + Sync { | |
| // Returns unique device identifier. | |
| fn device_id(&self) -> u64; | |
| // Returns the current display data. | |
| fn display_data(&self) -> VRDisplayData; | |
| // Returns the inmediate VRFrameData of the HMD. | |
| // Should be used when not presenting to the device. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub trait VRService: Send { | |
| fn initialize(&mut self) -> Result<(), String>; | |
| fn fetch_devices(&mut self) -> Result<Vec<VRDevicePtr>, String>; | |
| fn is_available(&self) -> bool; | |
| fn poll_events(&self) -> Vec<VRDisplayEvent>; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let mut vr = VRServiceManager::new(); | |
| // Register default VRService implementations. | |
| // Default VRServices are specified using cargo features. | |
| vr.register_defaults(); | |
| // Fallback to Mock Device if no real headset is found. | |
| vr.register_mock(); | |
| // Intialize all registered VR Services | |
| vr.initialize_services(); | |
| // Discover VR devices | |
| let devices = vr.get_devices(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while let Ok(msg) = self.receiver.recv() { | |
| match msg { | |
| WebVRMsg::RegisterContext(context) => { | |
| self.handle_register_context(context); | |
| self.schedule_poll_events(); | |
| }, | |
| WebVRMsg::UnregisterContext(context) => { | |
| self.handle_unregister_context(context); | |
| }, | |
| WebVRMsg::PollEvents(sender) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Trait object that handles WebVR commands. | |
| // Receives the texture_id associated to the WebGLContext. | |
| pub trait VRCompositorHandler: Send { | |
| fn handle(&mut self, command: VRCompositorCommand, texture_id: Option<u32>); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub enum VRCompositorCommand { | |
| Create(VRCompositorId), | |
| SyncPoses(VRCompositorId, f64, f64, IpcSender<Result<Vec<u8>,()>>), | |
| SubmitFrame(VRCompositorId, [f32; 4], [f32; 4]), | |
| Release(VRCompositorId) | |
| } |
OlderNewer