2 * Copyright © 2004 Marco Pesenti Gritti
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * $Id: EphyUtils.h 6952 2007-03-11 19:42:02Z chpe $
24 // cannot include EphyUtils with internal strings!
25 #ifdef MOZILLA_INTERNAL_API
26 #error Cannot use EphyUtils with MOZILLA_INTERNAL_API
31 #include <gtk/gtkwidget.h>
42 nsresult
GetIOService (nsIIOService
**ioService
);
44 nsresult
NewURI (nsIURI
**result
,
45 const nsAString
&spec
,
46 const char *charset
= nsnull
,
47 nsIURI
*baseURI
= nsnull
);
49 nsresult
NewURI (nsIURI
**result
,
50 const nsACString
&spec
,
51 const char *charset
= nsnull
,
52 nsIURI
*baseURI
= nsnull
);
54 nsresult
NewFileURI (nsIURI
**result
,
57 GtkWidget
*FindEmbed (nsIDOMWindow
*aDOMWindow
);
59 GtkWidget
*FindGtkParent (nsIDOMWindow
*aDOMWindow
);
61 char * ConvertUTF16toUTF8 (const PRUnichar
*, PRInt32
);
66 PRBool
IsCalledFromScript ();
68 /* not addref'd! */ nsIDOMWindow
* GetDOMWindowFromCallContext ();