gecko-dev/tools/wizards/templates/xpcom-component.tpl

46 строки
1.6 KiB
Smarty

# include default values
include "${top_wizard_dir}templates/default.tpl"
# location of templatized files
template_dir = ${top_wizard_dir}templates/xpcom-component/
# description of this template
template_description = file("${top_wizard_dir}templates/xpcom-component.description")
# directory depths
# if your xpcom component isn't going to end up in
# extensions/${component_name}, you'll need to adjust these depths accordingly.
depth_0_nix = ../..
depth_0_win = ..\..
depth_1_nix = ../../..
depth_1_win = ..\..\..
# variables the user's .tpl file MUST declare
required_variables = ${component_name}, ${implementation_guid}, \
${interface_name}, ${interface_guid}
# filename mappings
rename ("implementation.cpp", "${implementation_class_name}.cpp")
rename ("implementation.h", "${implementation_class_name}.h")
rename ("interface.idl", "${interface_name}.idl")
# .h file generated by the interface.idl file
interface_h_file = ${interface_name}.h
# component information
component_module_name = eval("lc('${component_name}')")
component_module_desc = ${component_name} (Generated from xpcom-component.tpl)
component_library_name = ${component_module_name}
component_required_libs = xpcom string xpconnect
# implementation information
implementation_class_name = ${component_name}
implementation_class_name_uc = eval("uc('${implementation_class_name}')")
implementation_contract_id = @mozilla.org/${component_name};1
implementation_guid_define = eval("define_guid('${implementation_guid}')")
# interface information
interface_name_uc = eval("uc('${interface_name}')")
interface_attribs = [scriptable, uuid(${interface_guid})]