AcrobatAccess.idl 15.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
/* AcrobatAccess.idl : IDL source for AcrobatAccess.dll
 *
 * This file will be processed by the MIDL tool to
 * produce the type library (AcrobatAccess.tlb) and marshalling code.
*/
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
*  (c) Copyright 2000-2004, 2006 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

import "oaidl.idl";
import "ocidl.idl";
import "oleidl.idl";
#if _MSC_VER >=1310
import "oleacc.idl";		//ajc - get the real definition of IAccessible from Microsoft
#endif

#ifdef TRUSTED_AT
	import "ProtDoc.idl";
#endif

[
	object,
	uuid(81f9b44f-ba3a-4f5d-9b51-090c74a9b3a4),
	dual,
	helpstring("IAccID Interface"),
	pointer_default(unique)
]
   interface IAccID : IUnknown
{
	[id(22), helpstring("method get_accID")] HRESULT get_accID([out, retval] long *pID);
   };

[
	object,
	uuid(B4848E37-7C66-40a6-9F66-D3A9BC8F4636),
	dual,
	helpstring("ISelectText Interface"),
	pointer_default(unique)
]
   interface ISelectText : IUnknown
{
	[id(23), helpstring("method selectText")] HRESULT selectText([in] long startID, [in] long startCharIndex, [in] long stopID, [in] long stopCharIndex);
};

#if _MSC_VER <= 1200
[
	object,
	uuid(618736e0-3c3d-11cf-810c-00aa00389b71),
	dual,
	helpstring("IAccessible Interface"),
	pointer_default(unique)
]
interface IAccessible : IDispatch
{
	[id(1), helpstring("method get_accParent")] HRESULT get_accParent([out, retval] IDispatch **ppDispParent);
	[id(2), helpstring("method get_accChildCount")] HRESULT get_accChildCount([out, retval] long *pCountChildren);
	[id(3), helpstring("method get_accChild")] HRESULT get_accChild([in] VARIANT varChildID, [out, retval] IDispatch ** ppDispChild);
	[id(4), helpstring("method get_accName")] HRESULT get_accName([in] VARIANT varID, [out, retval] BSTR* pszName);
	[id(5), helpstring("method get_accValue")] HRESULT get_accValue([in] VARIANT varID, [out, retval] BSTR *pszValue);
	[id(6), helpstring("method get_accDescription")] HRESULT get_accDescription([in] VARIANT varID, [out, retval] BSTR *pszDescription);
	[id(7), helpstring("method get_accRole")] HRESULT get_accRole([in] VARIANT varID, [out, retval] VARIANT *pvarRole);
	[id(8), helpstring("method get_accState")] HRESULT get_accState([in] VARIANT varID, [out, retval] VARIANT *pvarState);
	[id(9), helpstring("method get_accHelp")] HRESULT get_accHelp([in] VARIANT varID, [out, retval] BSTR *pszHelp);
	[id(10), helpstring("method get_accHelpTopic")] HRESULT get_accHelpTopic([out] BSTR *pszHelpFile, [in] VARIANT varChild, [out, retval] long *pidTopic);
	[id(11), helpstring("method get_accKeyboardShortcut")] HRESULT get_accKeyboardShortcut([in] VARIANT varID, [out, retval] BSTR *pszKeyboardShortcut);
	[id(12), helpstring("method get_accFocus")] HRESULT get_accFocus([out, retval] VARIANT *pvarID);
	[id(13), helpstring("method get_accSelection")] HRESULT get_accSelection([out, retval] VARIANT *pvarChildren);
	[id(14), helpstring("method get_accDefaultAction")] HRESULT get_accDefaultAction([in] VARIANT varID, [out, retval] BSTR *pszDefaultAction);
	[id(15), helpstring("method accSelect")] HRESULT accSelect([in] long flagsSelect, [in] VARIANT varID);
	[id(16), helpstring("method accLocation")] HRESULT accLocation([out] long *pxLeft, [out] long *pyTop, [out] long *pcxWidth, [out] long *pcyHeight, [in] VARIANT varID);
	[id(17), helpstring("method accNavigate")] HRESULT accNavigate([in] long navDir, [in] VARIANT varStart, [out, retval]  VARIANT *pvarEnd);
	[id(18), helpstring("method accHitTest")] HRESULT accHitTest([in] long xLeft, [in] long yTop, [out, retval] VARIANT *pvarID);
	[id(19), helpstring("method accDoDefaultAction")] HRESULT accDoDefaultAction([in] VARIANT varID);
	[id(20), helpstring("method put_accName")] HRESULT put_accName([in] VARIANT varID, [in] BSTR szName);
	[id(21), helpstring("method put_accValue")] HRESULT put_accValue([in] VARIANT varID, [in] BSTR szValue);
};
#endif

typedef enum
{
	CPDDomNode_Document				= 1,
	CPDDomNode_Page					= 2,
	CPDDomNode_StructElement		= 3,
	CPDDomNode_Text					= 4,
	CPDDomNode_Word					= 5,
	CPDDomNode_Char					= 6,
	CPDDomNode_Graphic				= 7,
	CPDDomNode_Link					= 8,
	CPDDomNode_PushButtonField		= 9,
	CPDDomNode_TextEditField		=10,
	CPDDomNode_StaticTextField		=11,
	CPDDomNode_ListboxField			=12,
	CPDDomNode_ComboboxField		=13,
	CPDDomNode_CheckboxField		=14,
	CPDDomNode_RadioButtonField		=15,
	CPDDomNode_SignatureField		=16,
	CPDDomNode_OtherField			=17,
	CPDDomNode_Comment				=18,
	CPDDomNode_TextComment			=19,
	CPDDomNode_Other				=20,
	CPDDomNode_LineSeg				=21,
	CPDDomNode_WordSeg				=22,
	CPDDomNode_BarCode				=23
} CPDDomNodeType;

typedef enum
{
	PDDOM_FONTATTR_ITALIC 	= 0x1,
	PDDOM_FONTATTR_SMALLCAP = 0x2,
	PDDOM_FONTATTR_ALLCAP	= 0x4,
	PDDOM_FONTATTR_SCRIPT	= 0x8,
	PDDOM_FONTATTR_BOLD	= 0x10,
	PDDOM_FONTATTR_LIGHT	= 0x20
} PDDOM_FontStyle;

typedef enum
{
	FontInfo_Unchecked		= 1,
	FontInfo_NoInfo			= 2,
	FontInfo_MixedInfo		= 3,
	FontInfo_Valid			= 4
} FontInfoState;

typedef enum
{
	DocState_OK				= 0,
	DocState_Protected		= 1,
	DocState_Empty			= 2,
	DocState_Unavailable	= 3
} DocState;

typedef enum
{
	Relationship_Descendant	= 0,
	Relationship_Ancestor	= 1,
	Relationship_Before		= 2,
	Relationship_After		= 3,
	Relationship_Equal		= 4,
	Relationship_None		= 5
} NodeRelationship;

[
	helpstring("IPDDomNode Interface"),
    object,
	dual,
    uuid(5007373a-20d7-458f-9ffb-abc900e3a831),
	pointer_default(unique)
]

interface IPDDomNode : IDispatch
{

    HRESULT GetParent
    (
        [out, retval] IPDDomNode **ppDispParent
    );

    HRESULT GetType
    (
		[out, retval] long *pNodeType
    );

    HRESULT GetChildCount
    (
        [out, retval] long *pCountChildren
    );

    HRESULT GetChild
    (
		[in] long index,
        [out, retval] IPDDomNode **ppDispChild
    );

    HRESULT GetName
    (
        [out, retval] BSTR *pszName
    );

    HRESULT GetValue
    (
        [out, retval] BSTR *pszName
    );

    HRESULT IsSame
    (
	    [in] IPDDomNode *node,
	    [out, retval] BOOL *isSame
    );

    HRESULT GetTextContent
    (
        [out, retval] BSTR *pszText
    );

    HRESULT GetLocation
    (
		[out] long *pxLeft, 
		[out] long *pyTop, 
		[out] long *pcxWidth, 
		[out] long *pcyHeight
    );

    HRESULT GetFontInfo
    (
		[out] long *fontStatus,
        [out] BSTR *pszName,
        [out] float *fontSize,
		[out] long *fontFlags, 
		[out] float *red,
 		[out] float *green,
		[out] float *blue
    );

    HRESULT GetFromID
    (
		[in] BSTR id,
        [out, retval] IPDDomNode **ppDispNode
    );

    HRESULT GetIAccessible
    (
		 [out, retval] IAccessible **ppDispIAccessible
    );

    HRESULT ScrollTo
    (
    );

    HRESULT GetTextInLines
    (
		[in] BOOL visibleOnly,
        [out, retval] IPDDomNode **ppDisp
    );

}

[
	helpstring("IPDDomNodeExt Interface"),
	object,
	dual,
	uuid(4A894040-247E-4aff-BB08-3489E9905235),
	pointer_default(unique)
]

interface IPDDomNodeExt : IUnknown
{
	HRESULT GetState([out, retval] long *pState);

	HRESULT Navigate([in] long navDir, [out, retval] IPDDomNode **ppEnd);

	HRESULT SetFocus();

	HRESULT GetIndex([out, retval] long *pIndex);

	HRESULT GetPageNum([out]long *firstPage, [out]long *lastPage);

	HRESULT DoDefaultAction();

    HRESULT ScrollToEx(BOOL favorLeft, BOOL favorTop );

	HRESULT Relationship([in] IPDDomNode *node, [out] long *pRel);

}

[
	helpstring("IPDDomElement Interface"),
    object,
    dual,
	uuid(198f17ae-b921-4308-9543-288d426a5c2b),
    pointer_default(unique)
]

interface IPDDomElement : IPDDomNode
{

    HRESULT GetTagName
    (
        [out, retval] BSTR *pszTagName
    );

    HRESULT GetStdName
    (
        [out, retval] BSTR *pszStdName /*perhaps this should be a enum */
    );

    HRESULT GetID
    (
        [out, retval] BSTR *pszId
    );

   HRESULT GetAttribute
    (
		[in] BSTR pszAttr,
 		[in] BSTR pszOwner,
		[out, retval] BSTR *pszAttrVal
    );

}

[
 	helpstring("IPDDomWord Interface"),
	object,
    dual,
	uuid(03c2aea5-befa-4c84-a187-c9245ac784f6),
    pointer_default(unique)
]

interface IPDDomWord : IPDDomNode
{
	HRESULT LastWordOfLine
	(
		[out, retval] BOOL *isLast
	);

}

[
	helpstring("IPDDomDocument Interface"),
	object,
	dual,
	uuid(00FFD6C4-1A94-44bc-AD3E-8AC18552E3E6),
	pointer_default(unique)
]

interface IPDDomDocument : IPDDomElement
{

	HRESULT GetFocusNode([out, retval] IPDDomNode **node);

	HRESULT NextFocusNode([in] BOOL forward, [out, retval] IPDDomNode **node);

	HRESULT GetDocInfo
		(
		[out] BSTR *fileName,
		[out] long *nPages,
		[out] long *firstVisiblePage,
		[out] long *lastVisiblePage,
		[out] long *status,
		[out] BSTR *lang
		);

	HRESULT SelectText([in] IPDDomWord *startID, [in] long startCharIndex, [in] IPDDomWord *stopID, [in] long stopCharIndex);

	HRESULT GetTextSelection([out] BSTR *pSelection);

	HRESULT GetSelectionBounds ([out] IPDDomWord **pStart, [out] long *startIndex, [out] IPDDomWord **pStop, long *stopIndex);

	HRESULT GetCaret(
		[out] long *pxLeft, 
		[out] long *pyTop, 
		[out] long *pcxWidth, 
		[out] long *pcyHeight,
		[out] IPDDomNode **node,
		[out] long *index
		);

	HRESULT SetCaret([in]IPDDomWord *node, [in] long index);

	HRESULT GoToPage( [in] long pageNum );
}

[
	object,
	uuid(f9f2fe81-f764-4bd0-afa5-5de841ddb625),
	dual,
	helpstring("GetPPDom Interface"),
	pointer_default(unique)
]

interface IGetPDDomNode : IUnknown
{
	[id(24), helpstring("method get_PDDomNode")] HRESULT get_PDDomNode([in] VARIANT varID, [out, retval] IPDDomNode **ppDispDoc);
};

[
	object,
	uuid(35ADDC4B-B470-45f9-B29C-B6845949A4FE),
	dual,
	helpstring("GroupInfo Interface"),
	pointer_default(unique)
]

interface IPDDomGroupInfo : IUnknown
{
	[id(24), helpstring("method GetGroupPosition")] HRESULT GetGroupPosition([out] long *groupSize, [out] long *position);
};

/** IPDDom option IDs.
*/
typedef enum
{
	IPDDOM_OPT_CLIPPEDLOCATION = 1, /*< The screen coordinates retrieved by 
																	IPDDomNode::GetLocation may be clipped to the container window. 
																	The corresponding value VARIANT should be of type VT_BOOL. The 
																	default value is true.
																	*/
	IPDDOM_OPT_RELATIVELOCATION = 2 /*< The screen coordinates retrieved by 
																	IPDDomNode::GetLocation may be relative to the top left corner 
																	of the container window. 
																	The corresponding value VARIANT should be of type VT_BOOL. The 
																	default value is false.
																	*/
} IPDDomOptIds;

/** The IPDDomGlobalOptions interface allows a client to set and retrieve options that 
	affect the behavior of several other IPDDom methods. For the meainig of a specific 
	option, see the definition of its corresponding ID.
	For example, to retrieve the unclipped screen coordinates of an IPDDomNode 
	object, and relative to the top-left corner of the containing window,  you can do:
	<code>
		CComQIPtr<IPDDomGlobalOptions> opts(pddn);
		if (opts)
		{
			VARIANT v;
			v.vt = VT_BOOL;
			v.boolVal = false;
			opts->SetOption(IPDDOM_OPT_CLIPPEDLOCATION,v);
			v.boolVal = true;
			opts->SetOption(IPDDOM_OPT_RELATIVELOCATION,v);
			pddn->GetLocation(...);
		}
	</code>
*/
[
	object,
	uuid(C37B1794-B61E-402b-9C7C-B073DE579AC1),
	dual,
	helpstring("IPDDom Global Options Interface"),
	pointer_default(unique)
]

interface IPDDomGlobalOptions : IUnknown
{
	[id(1), helpstring("method GetOption")] HRESULT GetOption(
		[in] IPDDomOptIds optId,[out, retval] VARIANT* value);
	[id(2), helpstring("method SetOption")] HRESULT SetOption(
		[in] IPDDomOptIds optId,[in] VARIANT value);
};

/** The pagination interface allows client to retrieve information about the 
	document toatal number of pages, which pages are currently visible, and a 
	textual label for pages. It also provides a method to make a specific page 
	visible. This interface is available for a PDDomNode of type CPDDomNode_Document.
	For insttance, to get the textual label of the first visible page, a client can do:
	<code>
	CComQIPtr<IPDDomDocPagination> pagination(pddNode);
	if (pagination)
	{
		long firstVisiblePage = -1;
		HRESULT hres = pagination->GetInfo( 0, &firstVisiblePage, 0 );
		if (SUCCEEDED(hres))
		{
			CComBSTR bstr;
			hres = pagination->LabelForPageNum( firstVisiblePage, &bstr );
		}
	}
	</code>
*/
[
	object,
	uuid(8E6D1CB7-4DAE-4DE4-8ED9-15672A5F942F),
	dual,
	helpstring("IPDDom Document Pagination Interface"),
	pointer_default(unique)
]

interface IPDDomDocPagination : IUnknown
{
	[id(1), helpstring("method GetInfo")]
	HRESULT GetInfo( [out] long* numPages, [out] long* firstVisiblePage,
		[out] long* lastVisiblePage ); /**< The same values can be obtained via 
									   IPDDomDocument::GetDocInfo. */

	/** Returns the page textual label associated with the given pageNum.
	If no textual label exists for pageNum, returns the string representing the 
	integer value pageNum. */
	[id(2), helpstring("method LabelForPageNum")]
	HRESULT LabelForPageNum( [in] long pageNum, [out, retval] BSTR* pageLabel );

	[id(3), helpstring("method GoToPage")]
	HRESULT GoToPage( [in] long pageNum ); //< Same as IPDDomDocument::GoToPage.
};

[
	uuid(C523F390-9C83-11D3-9094-00104BD0D535),
	version(3.0),
	helpstring("Acrobat Access 3.0 Type Library")
]
library AcrobatAccessLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(C523F39F-9C83-11D3-9094-00104BD0D535),
		helpstring("Accessible Class")
	]
	coclass Accessible
	{
		[default] interface IAccessible;
		interface IOleWindow;
		interface IEnumVARIANT;
		interface IAccID;
#ifdef TRUSTED_AT
		interface IProtDoc;
#endif
		interface IGetPDDomNode;
		interface ISelectText;
	};
	[
		uuid(ECAF4D9D-B473-4EC5-86F4-3DBB46F3F31A),
		helpstring("PDDom Class")
	]
	coclass PDDom
	{
		[default] interface IPDDomNode;
		interface IEnumVARIANT;
		interface IPDDomElement;
		interface IPDDomWord;
		interface IPDDomNodeExt;
		interface IPDDomDocument;
		interface IPDDomGroupInfo;
		interface IPDDomGlobalOptions;
		interface IPDDomDocPagination;
	}
};

// Service IDs

cpp_quote("
// {449D454B-1F46-497e-B2B6-3357AED9912B}
static const GUID SID_AccID = 
{ 0x449d454b, 0x1f46, 0x497e, { 0xb2, 0xb6, 0x33, 0x57, 0xae, 0xd9, 0x91, 0x2b } };

// {C0A1D5E9-1142-4cf3-B607-82FC3B96A4DF}
static const GUID SID_GetPDDomNode = 
{ 0xc0a1d5e9, 0x1142, 0x4cf3, { 0xb6, 0x7, 0x82, 0xfc, 0x3b, 0x96, 0xa4, 0xdf } };

// {1CA75614-5102-49ec-B4C2-70910ABB7078}
static const GUID SID_SelectText = 
{ 0x1ca75614, 0x5102, 0x49ec, { 0xb4, 0xc2, 0x70, 0x91, 0xa, 0xbb, 0x70, 0x78 } };

// {4EB77EC2-D966-4991-A75F-B6519C942787}
static const GUID SID_PDDomNode = 
{ 0x4eb77ec2, 0xd966, 0x4991, { 0xa7, 0x5f, 0xb6, 0x51, 0x9c, 0x94, 0x27, 0x87 } };

// {FEE94E78-901B-4988-AF1E-1E0C3DEFA0BA}
static const GUID SID_PDDomElement = 
{ 0xfee94e78, 0x901b, 0x4988, { 0xaf, 0x1e, 0x1e, 0xc, 0x3d, 0xef, 0xa0, 0xba } };

// {238168BC-50C2-4426-8BCE-0511FFF6372A}
static const GUID SID_PDDomWord = 
{ 0x238168bc, 0x50c2, 0x4426, { 0x8b, 0xce, 0x5, 0x11, 0xff, 0xf6, 0x37, 0x2a } };

// {4FD5A346-9F45-4126-993A-2A6E85BC0947}
static const GUID SID_PDDomNodeExt = 
{ 0x4fd5a346, 0x9f45, 0x4126, { 0x99, 0x3a, 0x2a, 0x6e, 0x85, 0xbc, 0x9, 0x47 } };

// {5AC8E54A-DD13-4630-8476-F169AD938B69}
static const GUID SID_PDDomDocument = 
{ 0x5ac8e54a, 0xdd13, 0x4630, { 0x84, 0x76, 0xf1, 0x69, 0xad, 0x93, 0x8b, 0x69 } };

// {DE846B3B-2BDE-41b9-9C06-971D239F0DE6}
static const GUID SID_GroupInfo = 
{ 0xde846b3b, 0x2bde, 0x41b9, { 0x9c, 0x6, 0x97, 0x1d, 0x23, 0x9f, 0xd, 0xe6 } };
")