Home | History | Annotate | Download | only in webkit
      1 /*
      2  *  Copyright (C) 2010 Igalia S.L.
      3  *
      4  *  This library is free software; you can redistribute it and/or
      5  *  modify it under the terms of the GNU Lesser General Public
      6  *  License as published by the Free Software Foundation; either
      7  *  version 2 of the License, or (at your option) any later version.
      8  *
      9  *  This library 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 GNU
     12  *  Lesser General Public License for more details.
     13  *
     14  *  You should have received a copy of the GNU Lesser General Public
     15  *  License along with this library; if not, write to the Free Software
     16  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     17  */
     18 
     19 #ifndef webkitwebplugin_h
     20 #define webkitwebplugin_h
     21 
     22 #include <glib-object.h>
     23 
     24 #include <webkit/webkitdefines.h>
     25 
     26 G_BEGIN_DECLS
     27 
     28 #define WEBKIT_TYPE_WEB_PLUGIN            (webkit_web_plugin_get_type())
     29 #define WEBKIT_WEB_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_PLUGIN, WebKitWebPlugin))
     30 #define WEBKIT_WEB_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_PLUGIN, WebKitWebPluginClass))
     31 #define WEBKIT_IS_WEB_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_PLUGIN))
     32 #define WEBKIT_IS_WEB_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_PLUGIN))
     33 #define WEBKIT_WEB_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_PLUGIN, WebKitWebPluginClass))
     34 
     35 typedef struct _WebKitWebPluginPrivate WebKitWebPluginPrivate;
     36 
     37 /**
     38  * WebKitWebPluginMIMEType:
     39  * @name: the name of the MIME type.
     40  * @description: the description of the MIME type.
     41  * @extensions: a %NULL-terminated array with the extensions
     42  * associated with this MIME type.
     43  *
     44  * A structure representing one of the MIME types associated with a
     45  * plugin. A #GSList of these objects will be returned by
     46  * #webkit_web_plugin_get_mimetypes, use
     47  * #webkit_web_plugin_mime_type_list_free to free it.
     48  *
     49  * Since: 1.3.8
     50  */
     51 typedef struct _WebKitWebPluginMIMEType {
     52     char* name;
     53     char* description;
     54     char** extensions;
     55 } WebKitWebPluginMIMEType;
     56 
     57 struct _WebKitWebPluginClass {
     58     GObjectClass parentClass;
     59 };
     60 
     61 struct _WebKitWebPlugin {
     62     GObject parentInstance;
     63 
     64     WebKitWebPluginPrivate* priv;
     65 };
     66 
     67 WEBKIT_API GType
     68 webkit_web_plugin_get_type        (void) G_GNUC_CONST;
     69 
     70 WEBKIT_API const char*
     71 webkit_web_plugin_get_name        (WebKitWebPlugin*);
     72 
     73 WEBKIT_API const char*
     74 webkit_web_plugin_get_description (WebKitWebPlugin*);
     75 
     76 WEBKIT_API const char*
     77 webkit_web_plugin_get_path        (WebKitWebPlugin*);
     78 
     79 WEBKIT_API GSList*
     80 webkit_web_plugin_get_mimetypes   (WebKitWebPlugin*);
     81 
     82 WEBKIT_API void
     83 webkit_web_plugin_set_enabled     (WebKitWebPlugin*, gboolean);
     84 
     85 WEBKIT_API gboolean
     86 webkit_web_plugin_get_enabled     (WebKitWebPlugin*);
     87 
     88 G_END_DECLS
     89 
     90 #endif
     91