2009-08-26 Chris Toshok <toshok@ximian.com>
[moon.git] / plugin / moonlight.h
blob5c5819dc704065c5dd4f48ad830220a011a5ed40
1 /*
2 * moonlight.h: MoonLight browser plugin.
4 * Contact:
5 * Moonlight List (moonlight-list@lists.ximian.com)
7 * Copyright 2007 Novell, Inc. (http://www.novell.com)
9 * See the LICENSE file included with the distribution for details.
13 #ifndef PLUGIN_CONFIG
14 #define PLUGIN_CONFIG
16 #include <stdio.h>
17 #include <string.h>
19 #define MOZ_X11
20 #ifndef XP_UNIX
21 #define XP_UNIX
22 #endif
24 #define Region _XxRegion
25 #define Visual _XxVisual
26 #include "moz-sdk/npapi.h"
27 #include "moz-sdk/npfunctions.h"
28 #include "moz-sdk/npruntime.h"
29 #undef Region
30 #undef Visual
32 #include <glib.h>
34 #if GLIB_SIZEOF_VOID_P == 8
35 #define GDK_NATIVE_WINDOW_POINTER 1
36 #endif
38 #include <gtk/gtk.h>
40 #include "libmoon.h"
42 // Plugin information
43 #define MIME_SILVERLIGHT_1 "application/x-silverlight"
44 #define MIME_SILVERLIGHT_2 "application/x-silverlight-2"
45 #define PLUGIN_NAME "Silverlight Plug-In"
46 #define PLUGIN_VERSION VERSION
47 #define PLUGIN_OURNAME "Novell Moonlight"
48 #define PLUGIN_SUFFIX "Novell <a href=\"http://www.mono-project.com/Moonlight\">Moonlight</a> " VERSION " is Mono's Free/Open Source implementation of Silverlight."
49 #if PLUGIN_SL_2_0
50 # define PLUGIN_DESCRIPTION "3.0.40624.0"
51 # define MIME_TYPES_HANDLED MIME_SILVERLIGHT_1 ":xaml:Novell Moonlight;" MIME_SILVERLIGHT_2 "::Novell Moonlight"
52 #else
53 # define PLUGIN_DESCRIPTION "1.0.30401.0"
54 # define MIME_TYPES_HANDLED MIME_SILVERLIGHT_1 ":scr:Novell Moonlight"
55 #endif
57 #define MAX_STREAM_SIZE 65536
59 #define USE_LIBMOONLOADER 1
61 #if USE_LIBMOONLOADER
62 #define LOADER_RENAMED_SYM(x) Plugin_##x
63 #define LOADER_QUOTE(x) #x
64 #define LOADER_RENAMED_NAME(x) LOADER_QUOTE(Plugin_##x)
66 extern "C" {
67 char *LOADER_RENAMED_SYM(NP_GetMIMEDescription) (void);
68 NPError LOADER_RENAMED_SYM(NP_GetValue) (void *future, NPPVariable variable, void *value);
69 #ifdef XP_UNIX
70 NPError OSCALL LOADER_RENAMED_SYM(NP_Initialize) (NPNetscapeFuncs *mozilla_funcs, NPPluginFuncs *plugin_funcs);
71 #else
72 NPError OSCALL LOADER_RENAMED_SYM(NP_Initialize) (NPNetscapeFuncs *mozilla_funcs);
73 #endif
74 NPError OSCALL LOADER_RENAMED_SYM(NP_Shutdown) (void);
76 #else
77 #define LOADER_RENAMED_SYM(x) x
78 #define LOADER_RENAMED_NAME(x) #x
79 #endif
81 #ifdef G_LOG_DOMAIN
82 #undef G_LOG_DOMAIN
83 #endif
85 #define G_LOG_DOMAIN "Moonlight"
87 #endif /* PLUGIN_CONFIG */