LibreOffice Module winaccessibility (master) 1
acccommon.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22//for MAccessible.cxx
23struct ltComp
24{
25 bool operator()(REFGUID rguid1, REFGUID rguid2) const
26 {
27 if(reinterpret_cast<LONG const *>(&rguid1)[0] < reinterpret_cast<LONG const *>(&rguid2)[0])
28 return true;
29 else if(reinterpret_cast<LONG const *>(&rguid1)[0] > reinterpret_cast<LONG const *>(&rguid2)[0])
30 return false;
31 if(reinterpret_cast<LONG const *>(&rguid1)[1] < reinterpret_cast<LONG const *>(&rguid2)[1])
32 return true;
33 else if(reinterpret_cast<LONG const *>(&rguid1)[1] > reinterpret_cast<LONG const *>(&rguid2)[1])
34 return false;
35 if(reinterpret_cast<LONG const *>(&rguid1)[2] < reinterpret_cast<LONG const *>(&rguid2)[2])
36 return true;
37 else if(reinterpret_cast<LONG const *>(&rguid1)[2] > reinterpret_cast<LONG const *>(&rguid2)[2])
38 return false;
39 if(reinterpret_cast<LONG const *>(&rguid1)[3] < reinterpret_cast<LONG const *>(&rguid2)[3])
40 return true;
41 else if(reinterpret_cast<LONG const *>(&rguid1)[3] > reinterpret_cast<LONG const *>(&rguid2)[3])
42 return false;
43 return false;
44 }
45};
46
47enum DM_NIR {
51 DM_PREVCHILD = 0x03
52};
53
54
55#define SELECT_STR L"Select"
56#define PRESS_STR L"Press"
57#define UNCHECK_STR L"UnCheck"
58#define CHECK_STR L"Check"
59//End
60
61template<typename T, typename Ifc> HRESULT
62createInstance(REFIID iid, Ifc ** ppIfc)
63{
64 return
65 CComCreator< CComObject<T> >::CreateInstance(nullptr, iid, reinterpret_cast<void**>(ppIfc));
66}
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DM_NIR
Definition: acccommon.h:47
@ DM_FIRSTCHILD
Definition: acccommon.h:48
@ DM_LASTCHILD
Definition: acccommon.h:49
@ DM_NEXTCHILD
Definition: acccommon.h:50
@ DM_PREVCHILD
Definition: acccommon.h:51
HRESULT createInstance(REFIID iid, Ifc **ppIfc)
Definition: acccommon.h:62
LONG
bool operator()(REFGUID rguid1, REFGUID rguid2) const
Definition: acccommon.h:25