]> git.sesse.net Git - vlc/blobdiff - plugins/win32/win32.cpp
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / win32 / win32.cpp
index 26eb1b9a3db9d31be8ae9848f4d6b5ea5d216137..e3480b3c849546cc17b680784e463e8d004f3650 100644 (file)
 #include "win32.h"                                       /* Borland specific */
 
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * External prototypes
  *****************************************************************************/
-void _M( intf_getfunctions ) ( function_list_t * p_function_list );
+int  E_(Open)  ( vlc_object_t * );
+void E_(Close) ( vlc_object_t * );
 
 /*****************************************************************************
- * Build configuration tree.
+ * Module descriptor
  *****************************************************************************/
 
 #define MAX_LINES_TEXT N_("maximum number of lines in the log window")
@@ -44,22 +45,13 @@ void _M( intf_getfunctions ) ( function_list_t * p_function_list );
     "You can set the maximum number of lines that the log window will display."\
     " Enter -1 if you want to keep all messages." )
 
-MODULE_CONFIG_START
-ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
-    ADD_INTEGER( "intfwin-max-lines", 500, NULL, MAX_LINES_TEXT, MAX_LINES_LONGTEXT )
-MODULE_CONFIG_STOP
-
-MODULE_INIT_START
-    SET_DESCRIPTION( _("Win32 interface module") )
-    ADD_CAPABILITY( INTF, 100 )
-    ADD_SHORTCUT( "win" )
-    ADD_SHORTCUT( "win32" )
-MODULE_INIT_STOP
-
-MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
-MODULE_ACTIVATE_STOP
-
-MODULE_DEACTIVATE_START
-MODULE_DEACTIVATE_STOP
+vlc_module_begin();
+    add_category_hint( N_("Miscellaneous"), NULL );
+    add_integer( "intfwin-max-lines", 500, NULL, MAX_LINES_TEXT, MAX_LINES_LONGTEXT );
+    set_description( _("Win32 interface module") );
+    set_capability( "interface", 100 );
+    set_callbacks( E_(Open), E_(Close) );
+    add_shortcut( "win" );
+    add_shortcut( "win32" );
+vlc_module_end();