75 lines
1.0 KiB
C++
Executable File
75 lines
1.0 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2012, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "templates.h"
|
|
#include "core/request.h"
|
|
#include "core/version.h"
|
|
#include "core/plugin.h"
|
|
|
|
|
|
|
|
|
|
namespace TemplatesFunctions
|
|
{
|
|
|
|
|
|
void sys_ver_major(Info & i)
|
|
{
|
|
i.out << WINIX_VER_MAJOR;
|
|
}
|
|
|
|
|
|
void sys_ver_minor(Info & i)
|
|
{
|
|
i.out << WINIX_VER_MINOR;
|
|
}
|
|
|
|
|
|
|
|
void sys_ver_revision(Info & i)
|
|
{
|
|
i.out << WINIX_VER_REVISION;
|
|
}
|
|
|
|
|
|
|
|
static size_t sys_plugin_index = 0;
|
|
|
|
|
|
void sys_plugin_tab(Info & i)
|
|
{
|
|
sys_plugin_index = i.iter;
|
|
i.res = sys_plugin_index < plugin.GetPlugins()->size();
|
|
}
|
|
|
|
void sys_plugin_tab_has_name(Info & i)
|
|
{
|
|
if( sys_plugin_index < plugin.GetPlugins()->size() )
|
|
i.res = (*plugin.GetPlugins())[sys_plugin_index].plugin_name != 0;
|
|
}
|
|
|
|
void sys_plugin_tab_name(Info & i)
|
|
{
|
|
if( sys_plugin_index < plugin.GetPlugins()->size() )
|
|
{
|
|
const wchar_t * name = (*plugin.GetPlugins())[sys_plugin_index].plugin_name;
|
|
|
|
if( name )
|
|
i.out << name;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|