Skip to content

Instantly share code, notes, and snippets.

View trevorlinton's full-sized avatar
👨‍👩‍👧‍👦

Trevor Linton trevorlinton

👨‍👩‍👧‍👦
View GitHub Profile
@trevorlinton
trevorlinton / wpfbrowserex.cpp
Last active August 29, 2015 14:13
Rendering Content over WPF WebControl
#include <stdint.h>
#include <stdio.h>
#include <string>
#include <vcclr.h>
#include <windows.h>
#include <mmsystem.h>
#include <msclr/marshal.h>
#include <msclr/marshal_cppstd.h>
#include <d3d9.h>
@trevorlinton
trevorlinton / tint2_example.js
Created July 9, 2014 05:22
Tint2 Web Browser Example
application.addEventListener('launch', function() {
var win = new Window(800,600);
win.title = "My web browser, probably should add a status bar...";
var web = new WebView(win);
web.addEventListener('load', function() {
console.log('We may load this, unsure yet, nothing has been received but the request for: '+web.location);
});
web.addEventListener('request', function() {
console.log('Weve received a request and may go parse it out, last chance to cancel.');
@trevorlinton
trevorlinton / node_in_osx_main.mm
Last active February 19, 2020 19:01
Integrating node's event loop safely into CFRunLoop OSX (uvcf goes to 100% cpu after App run)
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#include "node.h"
#include "v8_typed_array.h"
#include "CoreFoundation/CoreFoundation.h"
static int init_argc;
static char **init_argv;
@interface AppDelegate : NSObject <NSApplicationDelegate>