]> git.sesse.net Git - vlc/blobdiff - plugins/gnome/gnome.c
* Ported Glide and MGA plugins to the new module API. MGA never worked,
[vlc] / plugins / gnome / gnome.c
index 533dc3271cb090ef7a5e40e9507168e5d6e7f43f..1b3c181ebec739964d5e25e4ae74cecdc887fae6 100644 (file)
@@ -21,6 +21,7 @@
  *****************************************************************************/
 
 #define MODULE_NAME gnome
+#include "modules_inner.h"
 
 /*****************************************************************************
  * Preamble
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "tests.h"
-
-#include "interface.h"
-#include "video.h"
-#include "video_output.h"
 
 #include "modules.h"
-#include "modules_inner.h"
 
 /*****************************************************************************
  * Building configuration tree
@@ -53,7 +48,7 @@ MODULE_CONFIG_END
 /*****************************************************************************
  * Capabilities defined in the other files.
  ******************************************************************************/
-extern void intf_getfunctions( function_list_t * p_function_list );
+void _M( intf_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
  * InitModule: get the module structure and configuration.
@@ -63,7 +58,7 @@ extern void intf_getfunctions( function_list_t * p_function_list );
  * be unloaded later to save memory, and we want to be able to access this
  * data even after the module has been unloaded.
  *****************************************************************************/
-int InitModule( module_t * p_module )
+MODULE_INIT
 {
     p_module->psz_name = MODULE_STRING;
     p_module->psz_longname = "Gnome interface module";
@@ -83,7 +78,7 @@ int InitModule( module_t * p_module )
  * be set to 0 and calls to NeedModule() be made to increment it. To unload
  * the module, one has to wait until i_usage == 0 and call DeactivateModule().
  *****************************************************************************/
-int ActivateModule( module_t * p_module )
+MODULE_ACTIVATE
 {
     p_module->p_functions = malloc( sizeof( module_functions_t ) );
     if( p_module->p_functions == NULL )
@@ -91,7 +86,7 @@ int ActivateModule( module_t * p_module )
         return( -1 );
     }
 
-    intf_getfunctions( &p_module->p_functions->intf );
+    _M( intf_getfunctions )( &p_module->p_functions->intf );
 
     p_module->p_config = p_config;
 
@@ -105,7 +100,7 @@ int ActivateModule( module_t * p_module )
  * returns, i_usage can be set to -1 and the module unloaded. Be careful to
  * lock usage_lock during the whole process.
  *****************************************************************************/
-int DeactivateModule( module_t * p_module )
+MODULE_DEACTIVATE
 {
     free( p_module->p_functions );