Search completed in 1.18 seconds.
6 results for "nsiwidget":
IME handling guide
Mozilla › IME handling guide
reated, starts to observe and notifies widget of IME getting focus. When the editor or windowless plugin loses focus, it notifies widget of IME losing focus, stops observing everything and is released. This class observes selection changes (caret position changes), text changes of a focused editor and layout changes (by reflow or scroll) of everything in the document. It depends on the result of nsIWidget::GetIMEUpdatePreference() what is observed. When this notifies something of widget and/or IME, it needs to be safe to run script because notifying something may cause dispatching one or more DOM events and/or new reflow. Therefore, IMEContentObserver only stores which notification should be sent to widget and/or IME. Then, mozilla::IMEContentObserver::IMENotificationSender tries to send the pend...
...gs object is modified in an HTML editor, e.g., resizing an image Composition string is moved to a different position which is specified by native IME (e.g., only a part of composition is committed) In the future, we should fix this limitation. If we make EditorBase not touch undo stack until composition is committed, some of the cases must be fixed. Notifications to IME XP part of Gecko uses nsIWidget::NotifyIME() for notifying widget of something useful to handle IME. Note that some of them are notified only when nsIWidget::GetIMEUpdatePreference() returns flags which request the notifications. NOTIFY_IME_OF_TEXT_CHANGE, NOTIFY_IME_OF_SELECTION_CHANGE, NOTIFY_IME_OF_POSITION_CHANGE and NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED are always sent by following order: NOTIFY_IME_OF_TEXT_CHANGE N...
...ents. If widget wants notifications even while all windows are deactive, IMEContentObserver doesn't end observing the focused editor. I.e., in this case, NOTIFY_IME_OF_FOCUS and NOTIFY_IME_OF_BLUR are not sent to widget when a window which has a composition is being activated or deactivated. When widget wants notifications during deactive, widget includes NOTIFY_DURING_DEACTIVE to the result of nsIWidget::GetIMEUpdatePreference(). If this notification is tried to sent before sending NOTIFY_IME_OF_FOCUS, all pending notifications and NOTIFY_IME_OF_BLUR itself are canceled. NOTIFY_IME_OF_TEXT_CHANGE When text of focused editor is changed, this is sent to widget with a range of the change. But this is sent only when result of nsIWidget::GetIMEUpdatePreference() includes NOTIFY_TEXT_CHANGE. If tw...
...And 6 more matches
nsIWindowMediator
Mozilla › Tech › XPCOM › Reference › Interface › nsIWindowMediator
nsISimpleEnumerator getEnumerator(in wstring aWindowType); nsIDOMWindow getMostRecentWindow(in wstring aWindowType); nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); nsISimpleEnumerator getXULWindowEnumerator(in wstring aWindowType); PRUint32 get...
...rvice: var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); Method overview void addListener(in nsIWindowMediatorListener aListener); boolean calculateZPosition(in nsIXULWindow inWindow, in unsigned long inPosition, in nsIWidget inBelow, out unsigned long outPosition, out nsIWidget outBelow); Native code only! nsISimpleEnumerator getEnumerator(in wstring aWindowType); nsIDOMWindow getMostRecentWindow(in wstring aWindowType); nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); nsISimpleEnumerator getXULWindowEnumerator(in wstring aWindowType); PRUint32 getZLevel(in nsIXULWindow aWindow); Native code only! ...
...execute removeListener, currently its commented out so you can copy paste this code in scratchpad and see it work Native code only!calculateZPosition A window wants to be moved in z-order. Calculate whether and how it should be constrained. Note this method is advisory only: it changes nothing either in WindowMediator's internal state or with the window. ...
...And 3 more matches
nsIDOMWindowUtils
Mozilla › Tech › XPCOM › Reference › Interface › nsIDOMWindowUtils
Sheet()/removeSheet(). See CSS2 specification for details. USER_SHEET 1 A possible type of a style sheet loaded/removed with loadSheet()/removeSheet(). See CSS2 specification for details. AUTHOR_SHEET 2 A possible type of a style sheet loaded/removed with loadSheet()/removeSheet(). See CSS2 specification for details. Methods activateNativeMenuItemAt() See nsIWidget.ActivateNativeMenuItemAt(). Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without UniversalXPConnect privileges. void activateNativeMenuItemAt( in AString indexString ); Parameters indexString clearMozAfterPaintEvents() void clearMozAfterPaintEvents(); Parameters None. compareCanvases() Compare the two canvases,...
...nd focus the document. Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without UniversalXPConnect privileges. Do not use this method. Just use element.focus if available or nsIFocusManager.SetFocus() instead. void focus( in nsIDOMElement aElement ); Parameters aElement The element to focus. forceUpdateNativeMenuAt() See nsIWidget.ForceUpdateNativeMenuAt(). Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without UniversalXPConnect privileges. void forceUpdateNativeMenuAt( in AString indexString ); Parameters indexString garbageCollect() Force a garbage collection followed by a cycle collection. Will throw a DOM security error if called without ...
... may be ignored by nsEventStateManager if some prefs are customized or aOptions value includes some flags. aOptions 0 or one or more WHEEL_EVENT_* flags. sendNativeKeyEvent() This method lets you create and send keyboard events to a DOM window from a privileged context; for example, this can be used to automate testing. This delivers the key to the currently-focused widget by calling its See nsIWidget.synthesizeNativeKeyEvent() method. This method throws a DOM security error if called without UniversalXPConnect privileges. void sendNativeKeyEvent( in long aNativeKeyboardLayout, in long aNativeKeyCode, in long aModifierFlags, in AString aCharacters, in AString aUnmodifiedCharacters ); Parameters aNativeKeyboardLayout aNativeKeyCode The key code to send. aModifierFlags Th...
...versalXPConnect privileges. void sendNativeKeyEvent( in long aNativeKeyboardLayout, in long aNativeKeyCode, in long aModifierFlags, in AString aCharacters, in AString aUnmodifiedCharacters ); Parameters aNativeKeyboardLayout aNativeKeyCode The key code to send. aModifierFlags The modifier flags to send. aCharacters aUnmodifiedCharacters sendNativeMouseEvent() See nsIWidget.SynthesizeNativeMouseEvent(). Will be called on the widget that contains aElement. Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without UniversalXPConnect privileges. void sendNativeMouseEvent( in long aScreenX, in long aScreenY, in long aNativeMessage, in long aModifierFlags, in nsIDOMElement aElement ); Parameters ...
Finding window handles - Archive of obsolete content
Archive › Add-ons › Code snippets › Finding Window Handles
ther technique is to use the Accessibility framework, see for example http://developer.mozilla.org/en/docs..._of_Interfaces Another way to find a window handle... Is to query it from an object. Once you have a docShell, QueryInterface it into nsIBaseWindow, call GetMainWidget on result, and then call GetNativeData(NS_NATIVE_WINDOW). Like this HWND GetHWND(nsIBaseWindow *window) { nsCOMPtr< nsIWidget > widget; window->GetMainWidget(getter_AddRefs(widget)); if (widget) return (HWND) widget->GetNativeData(NS_NATIVE_WINDOW); } Yet Another way to find a window handle (parent window handle) This method is for people who want to get the top level window HWND from the window object in javascript. Comparing to the method above, by using this method, you don't have to compile your compone...
...t; window->GetMainWidget(getter_AddRefs(widget)); if (widget) return (HWND) widget->GetNativeData(NS_NATIVE_WINDOW); } Yet Another way to find a window handle (parent window handle) This method is for people who want to get the top level window HWND from the window object in javascript. Comparing to the method above, by using this method, you don't have to compile your component with nsIWidget.h and other bunchs of h files that should not be exposed to outside, and could change every time Firefox updates, all you need is nsIBaseWindow.idl(It's not in gecko_sdk, get this from the latest Firefox source, or http://mxr.mozilla.org/mozilla/sourc...BaseWindow.idl), and use xpidl to compile it to .h file, although that's stll a unfrozen interface, but it should be a lot better. Notice that by...
nsIContentViewer
Mozilla › Tech › XPCOM › Reference › Interface › nsIContentViewer
nterfaces.nsIContentViewer); Method overview void clearHistoryEntry(); void close(in nsISHEntry historyEntry); void destroy(); [noscript,notxpcom,nostdcall] nsIViewPtr findContainerView(); void getBounds(in nsIntRectRef aBounds); Native code only! [noscript,notxpcom] nsIDocumentPtr getDocument(); void hide(); void init(in nsIWidgetPtr aParentWidget, [const] in nsIntRectRef aBounds); Native code only! void loadComplete(in unsigned long aStatus); void loadStart(in nsISupports aDoc); void move(in long aX, in long aY); void open(in nsISupports aState, in nsISHEntry aSHEntry); void pageHide(in boolean isUnload); boolean permitUnload([optional] in boolean aCallerClosesWindow...
...Bounds void getBounds( in nsIntRectRef aBounds ); Parameters aBounds Missing Description getDocument() Returns the DOM document object (as an nsIDocument without addrefing. [noscript,notxpcom] nsIDocumentPtr getDocument(); Parameters None. Return value The DOM document object. hide() void hide(); Parameters None. Native code only!init Initializes the content viewer. ...
Mozilla accessibility architecture
Mozilla › Accessibility › Accessibility architecture
s the accessibility service singleton (nsIAccessibilityService) to create the doc accessible and return it back to the widget code. The reason that the doc accessible is not created directly in the widget code where it's needed is that the widget code has no knowledge what nsIDOMNode is associated with the current window's document object. There must be a document for the current widget (nsWindow/nsIWidget) for the pres shell to create a doc accessible for it. One benefit of this approach is that accessibility.dll/libaccessibility.so does not need get loaded until the accessibility service gets used, and for most users it is never loaded. All other accessibles for the individual objects are created on demand as well. The assistive technology can choose to get the entire tree by using a depth- or br...