Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1848|回复: 1
打印 上一主题 下一主题

创建_XPCOM_组件

[复制链接]

388

主题

602

帖子

2218

积分

金牌会员

Rank: 6Rank: 6

积分
2218
跳转到指定楼层
楼主
发表于 2016-3-27 23:42:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
https://developer.mozilla.org/zh ... Creating_components

创建_XPCOM_组件
在本文章中





前言谁该读这本书本教程的组织按照例子来学习本书的体例致谢XPCOM 简介XPCOM 解决方案Gecko组件接口接口与封装nsISupports 基接口XPCOM 的IDCID契约 ID类厂XPIDL 与类型库XPCOM 服务XPCOM 类型方法类型引用计数状态码变量映射通用 XPCOM 错误码使用 XPCOM 组件组件的例子Cookie 管理器WebBrowserFind 组件WebLock 组件Mozilla 中使用的组件查找 Mozilla 组件在 Cpp 代码中使用 XPCOM 组件XPConnect: 在脚本中使用 XPCOM 组件组件内幕用Cpp书写组件XPCOM初始化XPCOM注册描述XPCOM注册的方法自动注册The Shutdown ProcessXPCOM组件库的三个部分XPCOM GlueThe Glue LibraryXPCOM String Classes建立组件代码我们将做什么组件注册The regxpcom Program其他的注册途径概览WebLock Module Source深度挖掘: 需要的Includes和常量XPCOM中的标识符注册过程的代码注册用的方法建立你的组件的接口webLock1.cpp使用XPCOM工具类让事情变得简单XPCOM 宏通用XPCOM模块宏基本实现宏声明宏webLock2.cppXPCOM中的字符串类使用字符串nsEmbedString 和 nsEmbedCString智能指针开始WebLock启动时被调用注册到消息访问Category Manager提供WebLock访问建立WebLock编程接口在XPIDL中定义WebLock接口XPIDL书写格式脚本化接口实现nsISupportsWeb Locking 接口实现WebLock声明宏在XPCOM中表达返回值XPIDL代码生成从客户端获取WebLock Service实现iWebLock接口The Directory Service用nsIFile改变路径用nsIFile操作文件用nsILocalFile读取数据处理White List DataiWebLock方法列举Lock and UnlockAddSiteRemoveSiteSetSitesGetNextGetSitesHasMoreElementsFinishing the ComponentUsing Frozen InterfacesCopying Interfaces Into Your Build EnvironmentImplementing the nsIContentPolicy InterfaceReceiving NotificationsImplementing the nsIContentPolicyUniform Resource LocatorsChecking the White ListCreating nsIURI ObjectsBuilding the WebLock UIUser Interface Package ListClient Code OverviewXULThe XUL DocumentThe Locking UISite Adding UIweblock.xulOverlaying New User Interface Into MozillawebLockOverlay.xulOther Resourcesweblock.cssImage Resources打包 WebLock组件安装预览资源归档WebLock 安装脚本WebLock 跟踪脚本分发你的组件附录 A - 建立 Gecko SDK下载和建立 SDK编译一个 Microsoft Visual Cpp 工程创建一个新的工程把 Gecko SDK 添加到工程设置Unix 下的一个 Makefile附录B - 资源WebLock 资源Gecko 资源XPCOM 资源General Development 资源

Copyright (c) 2003 by Doug Turner and Ian Oeschger. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.02 or later. Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.


回复

使用道具 举报

388

主题

602

帖子

2218

积分

金牌会员

Rank: 6Rank: 6

积分
2218
沙发
 楼主| 发表于 2016-4-23 17:34:13 | 只看该作者
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-4-30 23:36 , Processed in 0.062876 second(s), 18 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表