Back to index

lightning-sunbird  0.9+nobinonly
nullplugin.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is mozilla.org code.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Stephen Mak <smak@sun.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 /*
00041  * nullplugin.h
00042  *
00043  * Implementation of the null plugins for Unix.
00044  *
00045  * dp <dp@netscape.com>
00046  * updated 5/1998 <pollmann@netscape.com> 
00047  * updated 9/2000 <smak@sun.com>
00048  *
00049  */
00050 
00051 #define TARGET              "_blank"
00052 #define MIME_TYPES_HANDLED  "*:.*:All types"
00053 #define PLUGIN_NAME         "Default Plugin"
00054 #define PLUGIN_DESCRIPTION  "The default plugin handles plugin data for mimetypes and extensions that are not specified and facilitates downloading of new plugins."
00055 #define CLICK_TO_GET        "Click here to get the plugin"       
00056 #define CLICK_WHEN_DONE     "Click here after installing the plugin"
00057 
00058 #define REFRESH_PLUGIN_LIST "javascript:navigator.plugins.refresh(true)"
00059 #define PLUGINSPAGE_URL     "http://plugindoc.mozdev.org/winmime.html" /* XXX Branding: make configurable via .properties or prefs */
00060 #define OK_BUTTON           "OK"
00061 #define CANCEL_BUTTON       "CANCEL"
00062 #if defined(HPUX)
00063 #define JVM_SMARTUPDATE_URL "http://www.hp.com/go/java"
00064 #elif defined(VMS)
00065 #define JVM_SMARTUPDATE_URL "http://www.openvms.compaq.com/openvms/products/ips/mozilla_relnotes.html#java"
00066 #else 
00067 #define JVM_SMARTUPDATE_URL "http://java.com/download" /* XXX Branding: see above */
00068 #endif /* HPUX */
00069 #define JVM_MINETYPE        "application/x-java-vm"
00070 #define MESSAGE "\
00071 This page contains information of a type (%s) that can\n\
00072 only be viewed with the appropriate Plug-in.\n\
00073 \n\
00074 Click OK to download Plugin."
00075 
00076 #define GET 1
00077 #define REFRESH 2
00078 #include <gtk/gtk.h>
00079 
00080 typedef struct _PluginInstance
00081 {
00082     uint16 mode;
00083 #ifdef MOZ_X11
00084     Window window;
00085     Display *display;
00086 #endif
00087     uint32 x, y;
00088     uint32 width, height;
00089     NPMIMEType type;
00090     char *message;
00091 
00092     NPP instance;
00093     char *pluginsPageUrl;
00094     char *pluginsFileUrl;
00095     NPBool pluginsHidden;
00096 #ifdef MOZ_X11
00097     Visual* visual;
00098     Colormap colormap;
00099 #endif
00100     unsigned int depth;
00101     GtkWidget* dialogBox;
00102 
00103     NPBool exists;  /* Does the widget already exist? */
00104     int action;     /* What action should we take? (GET or REFRESH) */
00105 
00106 } PluginInstance;
00107 
00108 
00109 typedef struct _MimeTypeElement
00110 {
00111     PluginInstance *pinst;
00112     struct _MimeTypeElement *next;
00113 } MimeTypeElement;
00114 
00115 /* Extern functions */
00116 extern void makeWidget(PluginInstance *This);
00117 extern NPMIMEType dupMimeType(NPMIMEType type);
00118 extern void destroyWidget(PluginInstance *This);
00119 extern void makePixmap(PluginInstance *This);
00120 extern void destroyPixmap();
00121 
00122