/*
This file is a part of the NVDA project.
URL: http://www.nvda-project.org/
Copyright 2006-2010 NVDA contributers.
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2.0, as published by
    the Free Software Foundation.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This license can be found at:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

cpp_quote("/*")
cpp_quote("This file is a part of the NVDA project.")
cpp_quote("URL: http://www.nvda-project.org/")
cpp_quote("Copyright 2006-2010 NVDA contributers.")
cpp_quote("This program is free software: you can redistribute it and/or modify")
cpp_quote("it under the terms of the GNU General Public License version 2.0, as published by")
cpp_quote("the Free Software Foundation.")
cpp_quote("This program is distributed in the hope that it will be useful,")
cpp_quote("but WITHOUT ANY WARRANTY; without even the implied warranty of")
cpp_quote("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.")
cpp_quote("This license can be found at:")
cpp_quote("http://www.gnu.org/licenses/old-licenses/gpl-2.0.html")
cpp_quote("*/")

import "wtypes.idl";
import "oaidl.idl";

/**
 * Useful utlity methods that can be executed in-process from NVDA
 */
[
	uuid(7D76FD13-1154-4b71-BB8F-BDA783DEA856),
	version(1.0),
]
interface NvdaInProcUtils {

	typedef [context_handle] void* nvdaRegistrationHandle_t;

	error_status_t registerNVDAProcess([in] handle_t bindingHandle, [out] nvdaRegistrationHandle_t* registrationhandle);
	error_status_t unregisterNVDAProcess([in,out] nvdaRegistrationHandle_t* registrationhandle);

	error_status_t winword_expandToLine([in] const long windowHandle, [in] const int offset, [out] int* lineStart, [out] int* lineEnd);

	error_status_t winword_getTextInRange([in] const long windowHandle, [in] const int startOffset, [in] const int endOffset, [in] const long formatConfig, [out] BSTR* text); 

	error_status_t sysListView32_getGroupInfo([in] long windowHandle, [in] int groupIndex,  [out,string] BSTR* header, [out,string] BSTR* footer, [out] int* state);

}
