#include "sbMacWindowTitlebarService.h"
#include "../NativeWindowFromNode.h"
#include <sbFileUtils.h>
#include <nsColor.h>
#include <nsICategoryManager.h>
#include <nsIDOMDocument.h>
#include <nsIDOMElement.h>
#include <nsIDOMWindow.h>
#include <nsIWindowWatcher.h>
#include <nsNetUtil.h>
#include <nsServiceManagerUtils.h>
#include <nsStringGlue.h>
#include <objc/objc-runtime.h>
Go to the source code of this file.
|
static nsresult | GetDOMWindowFromNativeWindow (void *aNativeWindow, nsIDOMWindow **aDOMWindow) |
|
static nsresult | GetSBTitlebarColor (NSWindow *aWindow, NSColor **aColor) |
|
static nsresult | GetSBTitlebarImage (NSWindow *aWindow, NSImage **aImage) |
|
static nsresult | GetSBTitlebarTextColor (NSWindow *aWindow, NSColor **aColor) |
|
static nsresult | GetWindowAttribute (NSWindow *aWindow, const nsAString &aAttributeName, nsAString &aAttributeValue) |
|
static nsresult | GetWindowAttribute (NSWindow *aWindow, const nsAString &aAttributeName, NSColor **aColor) |
|
static nsresult | GetWindowAttribute (NSWindow *aWindow, const nsAString &aAttributeName, NSImage **aImage) |
|
static NSImage * | GetImageFromURL (const nsAString &aImageURL) |
|
static PRBool | SBParseColor (const nsAString &aColorString, nscolor *aColor) |
|
nsresult GetDOMWindowFromNativeWindow |
( |
void * |
aNativeWindow, |
|
|
nsIDOMWindow ** |
aDOMWindow |
|
) |
| |
|
static |
Return in aDOMWindow the DOM window corresponding to the native window specified by aNativeWindow.
- Parameters
-
aNativeWindow | Native window for which to find corresponding DOM window. |
aDOMWindow | Returned DOM window. |
- Returns
- NS_ERROR_NOT_AVAILABLE No DOM window corresponds to the native window.
Definition at line 366 of file sbMacWindowTitlebarService.mm.
NSImage * GetImageFromURL |
( |
const nsAString & |
aImageURL | ) |
|
|
static |
Return an image object read from the image URL specified by aImageURL.
- Parameters
-
- Returns
- Image object.
Definition at line 666 of file sbMacWindowTitlebarService.mm.
nsresult GetSBTitlebarColor |
( |
NSWindow * |
aWindow, |
|
|
NSColor ** |
aColor |
|
) |
| |
|
static |
Return in aColor the Songbird color that should be used for the titlebar for the window specified by aWindow. The color depends upon whether or not the window is the key window.
- Parameters
-
aWindow | Window for which to get titlebar color. |
aColor | Returned titlebar color. |
Definition at line 422 of file sbMacWindowTitlebarService.mm.
nsresult GetSBTitlebarImage |
( |
NSWindow * |
aWindow, |
|
|
NSImage ** |
aImage |
|
) |
| |
|
static |
Return in aImage the Songbird image that should be used for the titlebar for the window specified by aWindow. The image depends upon whether or not the window is the key window.
- Parameters
-
aWindow | Window for which to get titlebar image. |
aImage | Returned titlebar image. |
Definition at line 460 of file sbMacWindowTitlebarService.mm.
nsresult GetSBTitlebarTextColor |
( |
NSWindow * |
aWindow, |
|
|
NSColor ** |
aColor |
|
) |
| |
|
static |
Return in aColor the Songbird color that should be used for the titlebar text for the window specified by aWindow. The color depends upon whether or not the window is the key window.
- Parameters
-
aWindow | Window for which to get titlebar text color. |
aColor | Returned titlebar text color. |
Definition at line 498 of file sbMacWindowTitlebarService.mm.
nsresult GetWindowAttribute |
( |
NSWindow * |
aWindow, |
|
|
const nsAString & |
aAttributeName, |
|
|
nsAString & |
aAttributeValue |
|
) |
| |
|
static |
Return in aAttributeValue the value string for the attribute with the name specified by aAttributeName for the window specified by aWindow.
- Parameters
-
aWindow | Window for which to get attribute value. |
aAttributeName | Name of attribute to get. |
aAttributeValue | Returned attribute value. |
Definition at line 536 of file sbMacWindowTitlebarService.mm.
nsresult GetWindowAttribute |
( |
NSWindow * |
aWindow, |
|
|
const nsAString & |
aAttributeName, |
|
|
NSColor ** |
aColor |
|
) |
| |
|
static |
Return in aColor the color value for the attribute with the name specified by aAttributeName for the window specified by aWindow.
- Parameters
-
aWindow | Window for which to get attribute value. |
aAttributeName | Name of attribute to get. |
aColor | Returned attribute color value. |
Definition at line 583 of file sbMacWindowTitlebarService.mm.
nsresult GetWindowAttribute |
( |
NSWindow * |
aWindow, |
|
|
const nsAString & |
aAttributeName, |
|
|
NSImage ** |
aImage |
|
) |
| |
|
static |
Return in aImage the image value for the attribute with the name specified by aAttributeName for the window specified by aWindow.
- Parameters
-
aWindow | Window for which to get attribute value. |
aAttributeName | Name of attribute to get. |
aImage | Returned attribute image value. |
Definition at line 629 of file sbMacWindowTitlebarService.mm.
PRBool SBParseColor |
( |
const nsAString & |
aColorString, |
|
|
nscolor * |
aColor |
|
) |
| |
|
static |
Parse the color string specified by aColorString and return the parsed color in aColor. See Mozilla's nsAttrValue::ParseColor.
- Parameters
-
aColorString | Color string to be parsed. |
aColor | Returned parsed color string. |
- Returns
- PR_TRUE Whether the string could be parsed to a color.
Definition at line 706 of file sbMacWindowTitlebarService.mm.