1 /***************************************************************************
4 begin : Sun Mar 25 2001
5 copyright : (C) 2001 by andres
7 ***************************************************************************/
8 #define MODULE_NAME kde
9 #include "intf_plugin.h"
14 /*****************************************************************************
15 * Build configuration tree.
16 *****************************************************************************/
18 ADD_WINDOW( "Configuration for KDE module" )
19 ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
22 /*****************************************************************************
23 * Capabilities defined in the other files.
24 *****************************************************************************/
26 void _M( intf_getfunctions )( function_list_t * p_function_list );
28 /*****************************************************************************
29 * InitModule: get the module structure and configuration.
30 *****************************************************************************
31 * We have to fill psz_name, psz_longname and psz_version. These variables
32 * will be strdup()ed later by the main application because the module can
33 * be unloaded later to save memory, and we want to be able to access this
34 * data even after the module has been unloaded.
35 *****************************************************************************/
38 p_module->psz_name = MODULE_STRING;
39 p_module->psz_longname = "KDE interface module";
40 p_module->psz_version = VERSION;
42 p_module->i_capabilities = MODULE_CAPABILITY_NULL
43 | MODULE_CAPABILITY_INTF;
48 /*****************************************************************************
49 * ActivateModule: set the module to an usable state.
50 *****************************************************************************
51 * This function fills the capability functions and the configuration
52 * structure. Once ActivateModule() has been called, the i_usage can
53 * be set to 0 and calls to NeedModule() be made to increment it. To unload
54 * the module, one has to wait until i_usage == 0 and call DeactivateModule().
55 *****************************************************************************/
58 p_module->p_functions =
59 ( module_functions_t * )malloc( sizeof( module_functions_t ) );
60 if( p_module->p_functions == NULL )
65 _M( intf_getfunctions )( &p_module->p_functions->intf );
67 p_module->p_config = p_config;
72 /*****************************************************************************
73 * DeactivateModule: make sure the module can be unloaded.
74 *****************************************************************************
75 * This function must only be called when i_usage == 0. If it successfully
76 * returns, i_usage can be set to -1 and the module unloaded. Be careful to
77 * lock usage_lock during the whole process.
78 *****************************************************************************/
81 free( p_module->p_functions );