This file contains 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
#include <objc/objc-runtime.h> | |
// from objc_runtime_new.h with some simplifications | |
#if __LP64__ | |
typedef uint32_t mask_t; | |
#define FAST_DATA_MASK 0x00007ffffffffff8UL | |
#else | |
typedef uint64_t mask_t; | |
#define FAST_DATA_MASK 0xfffffffcUL |
This file contains 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
#include <vector> | |
#include <set> | |
struct TypeDescriptor { | |
TypeDescriptor* parent; | |
const char* name; | |
typedef std::set<TypeDescriptor*> ChildList; | |
ChildList children; |
This file contains 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
CefClient -> Handlers | |
RequestHandler: can be used as QNetworkAccessManager | |
-> OnBeforeResourceLoad(.., .., request) | |
-> request.GetHeaderMap() | |
-> request.Url | |
ContextMenuHandler: handle context menu here | |
-> OnBeforeContextMenu(.., .., .., model) | |
-> model.AddItem(id, caption) |
This file contains 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
Cef1: | |
CefBrowser::CreateBrowser -> | |
CreateBrowserHelper -> | |
PostTask to UI Thread -> | |
CefBrowser::CreateBrowserSync | |
CefBrowser::CreateBrowserSync(window_info, client_handler, url, settings) [browser_impl.cc] | |
-> new CefBrowserImpl(window_info, settings, opener{NativeView = null}, client_handler) | |
-> BrowserWebViewDelegate(this) |
This file contains 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
#define UKN_STATIC_RUN_CODE_I(name, code) \ | |
namespace { \ | |
static struct name { \ | |
name() { \ | |
code; \ | |
} \ | |
} UKN_JOIN(g_, name); \ | |
} | |
#define UKN_STATIC_RUN_CODE(code) \ |
This file contains 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
template<typename T> | |
void CCDirector::popSceneWithTransition(float t) { | |
CCAssert(m_pRunningScene != NULL, "running scene should not null"); | |
m_pobScenesStack->removeLastObject(); | |
unsigned int c = m_pobScenesStack->count(); | |
if (c == 0) { | |
end(); | |
} |
This file contains 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
class PngIconConverter | |
{ | |
/* input image with width = height is suggested to get the best result */ | |
/* png support in icon was introduced in Windows Vista */ | |
public static bool Convert(System.IO.Stream input_stream, System.IO.Stream output_stream, int size, bool keep_aspect_ratio = false) | |
{ | |
System.Drawing.Bitmap input_bit = (System.Drawing.Bitmap)System.Drawing.Bitmap.FromStream(input_stream); | |
if (input_bit != null) | |
{ | |
int width, height; |