fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / winaccessibility / source / UAccCOM / UAccCOM.cxx
blob86d27d6491aa8565e88f87f41951a2edeab9d3fb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "stdafx.h"
21 #include "resource.h"
22 #include <initguid.h>
23 #include "UAccCOM.h"
24 #include <accHelper.hxx>
26 #include "UAccCOM_i.c"
27 #include "ia2_api_all_i.c"
29 #include "MAccessible.h"
30 #include "EnumVariant.h"
31 #include "UNOXWrapper.h"
32 #include "AccComponent.h"
33 #include "AccRelation.h"
34 #include "AccAction.h"
35 #include "AccText.h"
36 #include "AccEditableText.h"
37 #include "AccImage.h"
38 #include "AccValue.h"
39 #include "AccTable.h"
40 #include "AccHyperLink.h"
41 #include "AccHyperText.h"
44 CComModule _Module;
46 BEGIN_OBJECT_MAP(ObjectMap)
47 OBJECT_ENTRY(CLSID_MAccessible, CMAccessible)
48 OBJECT_ENTRY(CLSID_EnumVariant, CEnumVariant)
49 OBJECT_ENTRY(CLSID_AccComponent, CAccComponent)
50 OBJECT_ENTRY(CLSID_AccRelation, CAccRelation)
51 OBJECT_ENTRY(CLSID_AccAction, CAccAction)
52 OBJECT_ENTRY(CLSID_AccText, CAccText)
53 OBJECT_ENTRY(CLSID_AccEditableText, CAccEditableText)
54 OBJECT_ENTRY(CLSID_AccImage, CAccImage)
55 OBJECT_ENTRY(CLSID_AccValue, CAccValue)
56 OBJECT_ENTRY(CLSID_AccTable, CAccTable)
57 OBJECT_ENTRY(CLSID_AccHyperLink, CAccHyperLink)
58 OBJECT_ENTRY(CLSID_AccHypertext, CAccHypertext)
59 END_OBJECT_MAP()
62 // DLL Entry Point
64 extern "C"
65 BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
67 if (dwReason == DLL_PROCESS_ATTACH)
69 _Module.Init(ObjectMap, hInstance, &LIBID_UACCCOMLib);
70 DisableThreadLibraryCalls(hInstance);
72 else if (dwReason == DLL_PROCESS_DETACH)
73 _Module.Term();
74 return TRUE; // ok
78 // Used to determine whether the DLL can be unloaded by OLE
80 STDAPI DllCanUnloadNow()
82 return (_Module.GetLockCount()==0) ? S_OK : E_FAIL;
86 // Returns a class factory to create an object of the requested type
88 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
90 return _Module.GetClassObject(rclsid, riid, ppv);
94 IMAccessible * UAccCOMCreateInstance()
96 IMAccessible * pIMA = 0;
97 HRESULT hr = createInstance<CMAccessible>(IID_IMAccessible, &pIMA);
98 return (S_OK == hr) ? pIMA : 0;
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */