Back to index

lightning-sunbird  0.9+nobinonly
mozilla_api.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is mozilla.org code.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard.  All Rights Reserved.
00018  * Portions created by the Initial Developer are Copyright (C) 2001
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *   Christopher Blizzard <blizzard@mozilla.org>
00023  *   Doug Turner <dougt@meer.net>  Branched from TestGtkEmbed.cpp
00024  *
00025  *   The 10LE Team (in alphabetical order)
00026  *   -------------------------------------
00027  *
00028  *    Ilias Biris       <ext-ilias.biris@indt.org.br> - Coordinator
00029  *    Afonso Costa      <afonso.costa@indt.org.br>
00030  *    Antonio Gomes     <antonio.gomes@indt.org.br>
00031  *    Diego Gonzalez    <diego.gonzalez@indt.org.br>
00032  *    Raoni Novellino   <raoni.novellino@indt.org.br>
00033  *    Andre Pedralho    <andre.pedralho@indt.org.br>
00034  *
00035  *
00036  * Alternatively, the contents of this file may be used under the terms of
00037  * either the GNU General Public License Version 2 or later (the "GPL"), or
00038  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00039  * in which case the provisions of the GPL or the LGPL are applicable instead
00040  * of those above. If you wish to allow use of your version of this file only
00041  * under the terms of either the GPL or the LGPL, and not to allow others to
00042  * use your version of this file under the terms of the MPL, indicate your
00043  * decision by deleting the provisions above and replace them with the notice
00044  * and other provisions required by the GPL or the LGPL. If you do not delete
00045  * the provisions above, a recipient may use your version of this file under
00046  * the terms of any one of the MPL, the GPL or the LGPL.
00047  *
00048  * ***** END LICENSE BLOCK ***** */
00049 
00050 #ifndef mozilla_api_h
00051 #define mozilla_api_h
00052 
00053 #include "minimo_types.h"
00054 
00055 /* mozilla specific headers */
00056 #include "prenv.h"
00057 #include "nsMemory.h"
00058 #include "gtkmozembed_internal.h"
00059 
00060 /* Includes used by Find features */
00061 #include "nsIWebBrowser.h"
00062 #include "nsIWebBrowserFind.h"
00063 #include "nsNetUtil.h"
00064 
00065 /* Includes used by 'mozilla_preference_set', 'mozilla_preference_set_int' and 'mozilla_preference_set_boolean' */
00066 #include "nsIPref.h"
00067 
00068 /* Includes used by 'save_mozilla' */
00069 #include "nsIPresShell.h"
00070 #include "nsIDocShell.h"
00071 #include "nsIDOMDocument.h"
00072 #include "nsIWebBrowserPersist.h"
00073 #include "nsIWebNavigation.h"
00074 #include "nsIDocShellTreeItem.h"
00075 #include "nsILocalFile.h"
00076 #include "nsIDocShellTreeOwner.h"
00077 #include "nsIDocument.h"
00078 
00079 /* Includes used by 'menu context' */
00080 #include "nsIDOMMouseEvent.h"
00081 #include "nsIDOMNSEvent.h"
00082 #include "nsIDOMEventTarget.h"
00083 #include "nsIDOMNSDocument.h"
00084 #include "nsIDOMHTMLElement.h"
00085 #include "nsIDOMNamedNodeMap.h"
00086 #include "nsIDOMNSHTMLElement.h"
00087 
00088 #define PREF_ID NS_PREF_CONTRACTID
00089 
00090 #ifdef NS_TRACE_MALLOC
00091 #include "nsTraceMalloc.h"
00092 #endif
00093 
00094 #ifdef MOZ_JPROF
00095 #include "jprof.h"
00096 #endif
00097 
00098 /* Mozilla API Methods - make possible the direct comunitation between Minimo Browser and the "Gecko Render Engine" */
00099 
00100 PRUnichar *mozilla_locale_to_unicode (const gchar *locStr);
00101 gboolean mozilla_find(GtkMozEmbed *b, const char *exp, PRBool IgnoreCase,
00102                       PRBool SearchBackWards, PRBool DoWrapFind,
00103                       PRBool SearchEntireWord, PRBool SearchInFrames,
00104                       PRBool DidFind);
00105 gboolean mozilla_preference_set (const char *preference_name, const char *new_value);
00106 gboolean mozilla_preference_set_boolean (const char *preference_name, gboolean new_boolean_value);
00107 gboolean mozilla_preference_set_int (const char *preference_name, gint  new_int_value);
00108 gboolean mozilla_save(GtkMozEmbed *b, gchar *file_name, gint all);
00109 void mozilla_save_image(GtkMozEmbed *b,gchar *location, gchar *FullPath);
00110 gchar *mozilla_get_link_message (GtkWidget *embed);
00111 glong mozilla_get_context_menu_type(GtkMozEmbed *b, gpointer event,  gchar **img,  gchar **link, gchar **linktext);
00112 gchar *mozilla_get_attribute (nsIDOMNode *node, gchar *attribute);
00113 gboolean mozilla_save_prefs (void);
00114 
00115 #define CONTEXT_NONE     0
00116 #define CONTEXT_DEFAULT  1
00117 #define CONTEXT_LINK     2
00118 #define CONTEXT_IMAGE    4
00119 #define CONTEXT_DOCUMENT 8
00120 #define CONTEXT_INPUT    64
00121 #define CONTEXT_OTHER    128
00122 #define CONTEXT_XUL      256
00123 
00124 #endif