nss: upgrade to release 3.73
[LibreOffice.git] / winaccessibility / source / UAccCOM / AccComponent.h
blob99610872d83043100b2ee5f385d3b760f171700f
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 #ifndef INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMPONENT_H
21 #define INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMPONENT_H
23 #include "Resource.h" // main symbols
25 #include <com/sun/star/accessibility/XAccessible.hpp>
26 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
27 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
28 #include "UNOXWrapper.h"
29 #include "AccComponentBase.h"
32 /**
33 * CAccComponent implements IAccessibleComponent interface.
35 class ATL_NO_VTABLE CAccComponent :
36 public CComObjectRoot,
37 public CComCoClass<CAccComponent,&CLSID_AccComponent>,
38 public IAccessibleComponent,
39 public CAccComponentBase
41 public:
42 CAccComponent()
46 BEGIN_COM_MAP(CAccComponent)
47 COM_INTERFACE_ENTRY(IAccessibleComponent)
48 COM_INTERFACE_ENTRY(IUNOXWrapper)
49 COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_)
50 #if defined __clang__
51 #pragma clang diagnostic push
52 #pragma clang diagnostic ignored "-Winconsistent-missing-override"
53 #endif
54 END_COM_MAP()
55 #if defined __clang__
56 #pragma clang diagnostic pop
57 #endif
59 static HRESULT WINAPI SmartQI_(void* pv,
60 REFIID iid, void** ppvObject, DWORD_PTR)
62 return static_cast<CAccComponent*>(pv)->SmartQI(iid,ppvObject);
65 HRESULT SmartQI(REFIID iid, void** ppvObject)
67 if( m_pOuterUnknown )
68 return OuterQueryInterface(iid,ppvObject);
69 return E_FAIL;
72 DECLARE_NO_REGISTRY()
74 public:
75 // IAccessibleComponent
77 // Returns the location of the upper left corner of the object's bounding
78 // box relative to the parent.
79 STDMETHOD(get_locationInParent)(long *x, long *y) override;
81 // Returns the foreground color of this object.
82 STDMETHOD(get_foreground)(IA2Color * foreground) override;
84 // Returns the background color of this object.
85 STDMETHOD(get_background)(IA2Color * background) override;
88 #endif // INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMPONENT_H
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */