aboutsummaryrefslogtreecommitdiff
path: root/files/ru/mozilla/tech/xpcom/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/mozilla/tech/xpcom/index.html')
-rw-r--r--files/ru/mozilla/tech/xpcom/index.html47
1 files changed, 0 insertions, 47 deletions
diff --git a/files/ru/mozilla/tech/xpcom/index.html b/files/ru/mozilla/tech/xpcom/index.html
deleted file mode 100644
index 07687c0f82..0000000000
--- a/files/ru/mozilla/tech/xpcom/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
----
-title: XPCOM
-slug: Mozilla/Tech/XPCOM
-tags:
- - Landing
- - Mozilla
- - NeedsTranslation
- - TopicStub
- - XPCOM
-translation_of: Mozilla/Tech/XPCOM
----
-<p><span class="seoSummary"><strong>XPCOM</strong> is a cross platform component object model, similar to Microsoft COM. It has multiple <a href="/en-US/docs/XPCOM/Language_Bindings" title="XPCOM/Language_Bindings">language bindings</a>, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++.</span> Interfaces in XPCOM are defined in a dialect of IDL called <a href="/en-US/docs/XPIDL" title="XPIDL">XPIDL</a>.</p>
-
-<div class="warning">
-<p><strong>XPCOM is no longer available for use by Firefox extensions. Use <a href="/en-US/Add-ons/WebExtensions">WebExtensions</a> instead.</strong></p>
-</div>
-
-<p>XPCOM itself provides a set of core components and classes, e.g. file and memory management, threads, basic data structures (strings, arrays, variants), etc. The majority of XPCOM components are not part of this core set and are provided by other parts of the platform (e.g. <a href="/en-US/docs/Gecko" title="Gecko">Gecko</a> or <a href="/en-US/docs/Necko" title="Necko">Necko</a>) or by an application or even by an extension.</p>
-
-<div class="row topicpage-table">
- <div class="section"><dl><dl><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Accessing_the_Windows_Registry_Using_XPCOm">Accessing the Windows Registry Using XPCOM</a></dt><dd class="landingPageList">When implementing Windows-specific functionality, it is often useful to access the Windows registry for information about the environment or other installed programs. To this end, there exist <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a> interfaces to read and write registry data. This article will show you how to use the available interfaces in several Mozilla products.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Aggregating_the_In-Memory_Datasource">Aggregating the In-Memory Datasource</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/already_AddRefed">already_AddRefed</a></dt><dd class="landingPageList"><code>already_AddRefed</code> in association with <code><a href="/en-US/docs/NsCOMPtr">nsCOMPtr</a></code> allows you to assign in a pointer <strong>without</strong> <code>AddRef</code>ing it.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Binary_compatibility">Binary compatibility</a></dt><dd class="landingPageList">If Mozilla decides to upgrade to a compiler that does not have the same ABI as the current version, any built component may fail. It is a possiblity that is introduced when upgrading to a new compiler without recompiling everything. Effectively, it is a different platform.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Bundling_multiple_binary_components">Bundling multiple binary components</a></dt><dd class="landingPageList">Binary XPCOM components are sometimes required to implement low-level features for extensions. Since binary components are linked against a single Gecko SDK, a dependency to a particular version of Gecko is created. If the component uses only "frozen" XPCOM interfaces, there is a good chance the same binary component will work with different versions of Gecko (version 1.8 and 1.9, for example). The more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between Gecko versions. This can create a difficult situation for extension developers trying to support multiple Gecko versions (Firefox 2 and 3, for example).</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Creating_a_Python_XPCOM_component">Creating a Python XPCOM component</a></dt><dd class="landingPageList"><a href="http://books.mozdev.org/html"><em>Creating Applications with Mozilla</em></a> already provides <a href="http://books.mozdev.org/html/mozilla-chp-8-sect-2.html">a tutorial</a> for making a simple JavaScript or C++ component (implementing the <code>nsISimple</code> interface). Here is how to make the same component in Python using <a href="/en-US/docs/PyXPCOM" title="PyXPCOM">PyXPCOM</a>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Fun_with_XBL_and_XPConnect">Fun With XBL and XPConnect</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Generating_GUIDs">Generating GUIDs</a></dt><dd class="landingPageList"><strong>GUID</strong>s are used in Mozilla programming for identifying several types of entities, including XPCOM <a href="/en-US/docs/Interfaces">Interfaces</a> (this type of GUIDs is callled IID), components (CID), and legacy add-ons—like <a href="/en-US/docs/Extensions">extensions</a> and <a href="/en-US/docs/Themes">themes</a>—that were created prior to Firefox 1.5. <a href="/en-US/docs/Install_Manifests#id">Add-ons can (and should) be identified with IDs of the form <code><var>extensionname</var>@<var>organization</var>.<var>tld</var></code></a> since <a href="/en-US/docs/Firefox_1.5_for_developers">Firefox 1.5</a>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Generic_factory">Generic factory</a></dt><dd class="landingPageList">Most XPCOM factories can be very simple. Rick Potts wrote a templated-based generic factory (nsFactory&lt;t&gt;) that simplifies the factory creation process that just requires writing a CreateInstance() method. The new nsIGenericFactory interface takes this a step further, by providing a single interface that can be reused anytime a simple implementation of nsIFactory is needed. Here is the interface, and a description of its use.&lt;/t&gt;</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/How_to_build_a_binary_XPCOM_component_using_Visual_Studio">How to build a binary XPCOM component using Visual Studio</a></dt><dd class="landingPageList">This is a simple tutorial for building XPCOM objects in C++ using Visual Studio. XPCOM is Mozilla’s cross platform component object model, similar to Microsoft’s COM technology. XPCOM components can be implemented in C, C++, and JavaScript, and can be used from C, C++, and JavaScript. That means you can call JavaScript methods from C++ and vice versa. For more information on the workings of XPCOM look <a href="en/XPCOM">elsewhere</a>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/How_to_pass_an_XPCOM_object_to_a_new_window">How To Pass an XPCOM Object to a New Window</a></dt><dd class="landingPageList">If you want to be able to call functions within an XPCOM object from a XUL window's code, you can do so if you pass the XPCOM object as one of the arguments to the window creation method.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Interfacing_with_the_XPCOM_cycle_collector">Interfacing with the XPCOM cycle collector</a></dt><dd class="landingPageList">This is a quick overview of the cycle collector introduced into XPCOM for Firefox 3, including a description of the steps involved in modifying an existing C++ class to participate in XPCOM cycle collection. If you have a class that you think is involved in a cyclical-ownership leak, this page is for you.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Introduction_to_XPCOM_for_the_DOM">Introduction to XPCOM for the DOM</a></dt><dd class="landingPageList">Warning: this document has not yet been reviewed by the DOM gurus, it might contain some errors.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings">Language bindings</a></dt><dd class="landingPageList">An <strong>XPCOM Language Binding</strong> is a bridge between a particular language and <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a> to provide access to XPCOM objects from that language, and to let modules written in that language be used as XPCOM objects by all other languages for which there are XPCOM bindings.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Monitoring_HTTP_activity">Monitoring HTTP activity</a></dt><dd class="landingPageList">Gecko includes the <code><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIHttpActivityObserver" title="">nsIHttpActivityObserver</a></code> interface, which you can implement in your code to monitor <a href="/en/HTTP" title="en/HTTP">HTTP</a> transactions in real time, receiving a callback as the transactions take place.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/nsCOMPtr_versus_RefPtr">nsCOMPtr versus RefPtr</a></dt><dd class="landingPageList">Gecko code uses both <code>nsCOMPtr</code> and <code>RefPtr</code> as smart pointers. This guide provides some explanation and advice on how to choose between them.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Observer_Notifications">Observer Notifications</a></dt><dd class="landingPageList">The following are topics that you can observe during the course of an application. Unless otherwise noted you register for the topics using the <code><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIObserverService" title="">nsIObserverService</a></code>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Setting_HTTP_request_headers">Setting HTTP request headers</a></dt><dd class="landingPageList"><a href="/en-US/docs/HTTP">HTTP</a> is one of the core technologies behind the Web. In addition to the actual content, <a href="/en-US/docs/HTTP/Headers">some important information</a> is passed with HTTP headers for both HTTP requests and responses.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Storage">Storage</a></dt><dd class="landingPageList"><strong>Storage</strong> is a <a class="external" href="http://www.sqlite.org/">SQLite</a> database API. It is available to trusted callers, meaning extensions and Firefox components only.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/The_Thread_Manager">The Thread Manager</a></dt><dd class="landingPageList">The Thread Manager, introduced in Firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing.</dd></dl></dl></div>
- <div class="section"><dl><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Troubleshooting_XPCOM_components_registration">Troubleshooting XPCOM components registration</a></dt><dd class="landingPageList">Often the first time you create an XPCOM component, it may fail to register correctly.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_nsCOMPtr">Using nsCOMPtr</a></dt><dd class="landingPageList">This document is the sum total of everything written down about <code>nsCOMPtr</code>. If you have a question about <code>nsCOMPtr</code>, and this document doesn't answer it, there probably isn't a document that answers it. You'll have to turn to <a class="external" href="news:mozilla.dev.tech.xpcom">the XPCOM newsgroup</a> or another experienced <code>nsCOMPtr</code> user, or find the answer by experimentation.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_nsIClassInfo">Using nsIClassInfo</a></dt><dd class="landingPageList">If you use a C++ class which implements <code>nsIClassInfo</code> from JavaScript, then you don't have to explicitly call <code>QueryInterface</code> on the JavaScript object to access the object's interfaces.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_nsIDirectoryService">Using nsIDirectoryService</a></dt><dd class="landingPageList">nsDirectoryService implements the <code><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIProperties" title="">nsIProperties</a></code> interface. This implementation will allow you to <code>Get()</code>, <code>Set()</code>, <code>Define()</code>, and <code>Undefine()</code> <code><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIFile" title="">nsIFile</a></code>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_nsIPasswordManager">Using nsIPasswordManager</a></dt><dd class="landingPageList">Technical review completed.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_nsISimpleEnumerator">Using nsISimpleEnumerator</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_the_clipboard">Using the clipboard</a></dt><dd class="landingPageList">This section provides information about cutting, copying, and pasting to and from the clipboard.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Using_the_Gecko_SDK">Using the Gecko SDK</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Weak_reference">Weak reference</a></dt><dd class="landingPageList">In <a href="/en-US/docs/XPCOM">XPCOM</a>, a <strong>weak reference</strong> is a special object that contains a pointer to an XPCOM object, but does<em>not</em> keep that object alive. If the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to <code>nsnull</code>.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Working_with_multiple_versions_of_interfaces">Working with Multiple Versions of Interfaces</a></dt><dd class="landingPageList">In this short note we illustrate how one can update an XPCOM module in
-order for it to work in both Firefox 2 and Firefox 3, even if the interfaces have
-changed in the interim.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Working_with_out_parameters">Working with out parameters</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/wrappedJSObject">wrappedJSObject</a></dt><dd class="landingPageList"><code>wrappedJSObject</code> is a property sometimes available on <a href="en/XPConnect">XPConnect</a> wrappers. When available, it lets you access the JavaScript object hidden by the wrapper.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/XPCOM_ABI">XPCOM ABI</a></dt><dd class="landingPageList"><a href="/en/XPCOM" title="en/XPCOM">XPCOM</a> <abbr title="Application Binary Interface">ABI</abbr> is the binary interface of XPCOM components. While XPCOM components written in a scripting language (such as <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>) can be moved across platforms (such as Windows and OS X) without adaptation, those written in a compiled language (such as C++) require recompilation when moving to a different platform. Often, compiled XPCOM components are called 'binary' or 'native'.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/XPCOM_category_image-sniffing-services">XPCOM category image-sniffing-services</a></dt><dd class="landingPageList">In versions of Firefox prior to Firefox 3, extensions could add decoders for new image types. However, such decoders relied on servers sending correct MIME types; images sent with incorrect MIME types would not be correctly displayed.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Glue">XPCOM glue</a></dt><dd class="landingPageList">The XPCOM Glue is a static library which component developers and embedders can link against. It allows developers to link only against the frozen XPCOM method symbols and maintain compatibility with multiple versions of XPCOM.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Guide">XPCOM guide</a></dt><dd class="landingPageList">These articles provide tutorials and usage documentation for XPCOM, including how to use it in your own projects and how to build XPCOM components for your Firefox add-ons and the like.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/XPCOM_ownership_guidelines">XPCOM ownership guidelines</a></dt><dd class="landingPageList">...naturally. If you create a temporary object, obviously it's up to you to destroy it. That's a sure sign of ownership. If you create an object with a longer lifespan, you will own it until you give ownership away.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference">XPCOM reference</a></dt><dd class="landingPageList">This reference describes the interfaces and functions provided by the <a href="/en-US/docs/Mozilla/Tech/XPCOM">XPCOM</a> library. In addition, it details the various helper classes and functions, as well as the components, provided by the <a href="/en-US/docs/Mozilla/Tech/XPCOM/Glue">XPCOM glue</a> library. The contents herein are oriented primarily toward extension developers and people embedding XPCOM in other projects.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/XPCOM_tasks">XPCOM tasks</a></dt><dd class="landingPageList">The XPCOM module roughly parallels the C/C++ standard libraries. It overlaps them significantly, but goes beyond them in capabilities. XPCOM sits above the standard libraries. Its role is to extend them with facilities tailored to XPCOM development in general, and specifically the needs of Mozilla. Like the standard libraries, XPCOM must be a fairly self-contained library, so as not to encumber clients with any unnecessary external dependencies.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Thread_synchronization">XPCOM Thread Synchronization</a></dt><dd class="landingPageList">XPCOM thread synchronization primitives have the same semantics as those in NSPR, and each method of these synchronization objects (e.g. <code>Mutex::Lock()</code>) has a matching function in NSPR (<code>PR_Lock()</code>). This is no accident, as mozilla:: primitives are merely bare-minimum wrappers around NSPR's.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/xptcall_FAQ">xptcall FAQ</a></dt><dd class="landingPageList"><code>xptcall</code> is a small low level XPCOM method call library. It is implemented using platform specific C/C++ and assembly language code. It is used to facilitate cross language and cross thread method calls. Porting this code is required in order to make Mozilla run on any given platform.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/xptcall_porting_guide">Xptcall Porting Guide</a></dt><dd class="landingPageList">Original Author: John Bandhauer, 31 May 1999.</dd><dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/xptcall_porting_status">Xptcall Porting Status</a></dt><dd class="landingPageList">This is a status page for the multiplatform porting of xptcall. xptcall has a <a href="/En/Xptcall_FAQ">FAQ</a> and a <a href="/En/Xptcall_Porting_Guide">Porting Guide</a>.</dd></dl></div>
- </div>
-
-<div class="blockIndicator communitybox" dir="ltr">
-
- <div class="column-container">
- <h2 id="Join_the_XPCOM_community">Join the XPCOM community</h2>
- <div class="column-half">
- <div class="communitysubhead">Choose your preferred method for joining the discussion:</div>
- <ul class="communitymailinglist">
- <li><a href="https://lists.mozilla.org/listinfo/dev-tech-xpcom">Mailing list</a></li>
-
-
- <li><a href="http://groups.google.com/group/mozilla.dev.tech.xpcom">Newsgroup</a></li>
- <li><a href="http://groups.google.com/group/mozilla.dev.tech.xpcom/feeds">RSS feed</a></li>
-</ul>
- </div>
- <div class="column-half">
- <ul class="communitycontact"><li><strong>IRC: </strong><a href="irc://irc.mozilla.org/developers">#developers</a> <span class="smaller">(<a href="https://wiki.mozilla.org/IRC">learn more</a>)</span></li><li><strong>Tools: </strong><a href="http://ted.mielczarek.org/code/mozilla/jscomponentwiz/">JavaScript Component Wizard</a>, <a href="http://www.mytools360.com-a.googlepages.com/home#XPComPro">Visual C++ Component Wizard</a>, <a href="http://www.yutools.com/wp/tools/yuxpcomwizard/?lang=en">Visual C++ Component Wizard for Visual Studio 2010</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/xpcomviewer/">XPCOMViewer addon: browse XPCOM interfaces easily</a></li></ul>
- </div>
- </div>
-</div>
-
-<section id="Quick_Links"><ol><li><a href="http://www.ibm.com/developerworks/library/os-xpcomfirefox/">Tutorial from IBM DeveloperWorks</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">Binary components tutorial</a></li><li><a href="http://www.iosart.com/firefox/xpcom/">Linux and Windows how-to guide</a></li><li><a href="http://starkravingfinkle.org/blog/2006/10/mozilla-platform-xpcom-in-c/">Windows example blog post</a></li><li><a href="http://wanderingstan.com/2007-11-16/geekout_how_to_make_a_c_xpcom_component">Another Windows example</a></li><li><a href="http://rcrowley.org/2007/07/17/cross-platform-xpcom-a-howto.html">Mac OS X example</a></li><li><a href="/en-US/docs/Web/JavaScript" title="JavaScript (JS) is a lightweight interpreted or JIT-compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.">JavaScript</a></li></ol></section>