Chinaunix首页 | 论坛 | 博客
  • 博客访问: 58146
  • 博文数量: 8
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 120
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-20 12:32
文章分类
文章存档

2009年(1)

2008年(7)

我的朋友

分类: WINDOWS

2008-05-21 11:14:54

对Safari32的各个模块的一个简介

June 21st, 2007 by Joe Ranieri

This post is being restored from our old blog. It has been modified slightly from its original form. Comments have been lost.

recently released the Windows version of , spurring rumors about the return of Yellow Box (Cocoa for Windows). So, let’s take a look at the Safari directory (C:\Program Files\Safari\).

Apple libraries:

  • CFNetwork.dll: The networking library Safari depends on.
  • CoreFoundation.dll: A port of the OS X Foundation library. It’s partially open source in the form of CFLite.
  • CoreGraphics.dll: A partial port of OS X’s graphics engine (Quartz). It sits on top of Windows’ GDI and is handles all of Safari’s drawing needs.
  • PubSub.dll: A port of the OS X framework for handling RSS feeds. This framework isn’t public in 10.4, but will be in 10.5.
  • SafariTheme.dll: This takes care of rendering the OS X looking UI elements Safari and the WebKit use. If you were to replace this with something decent (upcoming blog post?) you’d almost have a decent UI.

Open source libraries:

  • WebKit.dll: , the rendering engine and heart of Safari.
  • icudt36.dll, icuin36.dll, icuuc36.dll: International Components for Unicode.
  • libtidy.dll: , a HTML/XML beautifier.
  • libxml.dll: , XML parser.
  • libxslt.dll: , XML transform engine.
  • pthreadVC2.dll:, a port of the POSIX thread library.
  • SQLite3.dll: The database engine.
  • zlib.dll: The compression library.

You’ll notice that all of these APIs are C++ or C. Yes, even the WebKit, which exposes a COM interface almost identical to the OS X Objective-C API. I’ll be blogging about this later.

So, does YellowBox live on? Sadly, no. You’ll notice no signs of Cocoa or Objective-C (strings or functions). Sure, Apple could have obfuscated everything, but it’d still show signs of being Objective-C. Objective-C messages have to go through objc_msgSend first, which involves putting the self object onto the stack, then the selector, and then your arguments. Everything in Safari is just called directly, without the layer of indirection.

Anyways, it appears they wrote it in Microsoft Visual Studio.

阅读(1059) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~