fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dtrans / test / win32 / dnd / atlwindow.hxx
blob0dbb0f5d879cb9adb609b1526168ef07f42ebfcf
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 .
19 #ifndef INCLUDED_DTRANS_TEST_WIN32_DND_ATLWINDOW_HXX
20 #define INCLUDED_DTRANS_TEST_WIN32_DND_ATLWINDOW_HXX
21 #include <atlbase.h>
22 extern CComModule _Module;
23 #include <atlcom.h>
24 #include <atlctl.h>
25 #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
26 #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
27 #include <com/sun/star/datatransfer/XTransferable.hpp>
28 #include <com/sun/star/uno/Reference.h>
29 #include "../../source/inc/DtObjFactory.hxx"
31 using namespace com::sun::star::uno;
32 using namespace com::sun::star::datatransfer::dnd;
33 using namespace com::sun::star::datatransfer;
35 struct ThreadData
37 Reference<XDragSource> source;
38 Reference<XTransferable> transferable;
39 HANDLE evtThreadReady;
42 class AWindow: public CWindowImpl<AWindow, CWindow,
43 CWinTraits<WS_CAPTION |WS_OVERLAPPEDWINDOW | WS_VISIBLE, 0> >
45 TCHAR m_strName[80];
46 Reference<XDropTarget> m_xDropTarget;
47 Reference<XDragSource> m_xDragSource;
48 BOOL m_isMTA;
50 HWND m_hwndEdit;
52 CDTransObjFactory m_aDataConverter;
54 public:
55 AWindow(LPCTSTR strName)
57 RECT rcPos= {0,0,200,200};
58 Create(0, rcPos, strName);
60 AWindow(LPCTSTR strName, RECT pos, BOOL mta=FALSE): m_isMTA( mta)
62 Create(0, pos, strName);
65 ~AWindow()
67 if(m_hWnd)
68 DestroyWindow();
71 BEGIN_MSG_MAP(AWindow)
72 MESSAGE_HANDLER( WM_CLOSE, OnClose)
73 MESSAGE_HANDLER( WM_CREATE, OnCreate)
74 MESSAGE_RANGE_HANDLER( WM_MOUSEFIRST, WM_MOUSELAST, OnMouseAction)
75 MESSAGE_HANDLER( WM_TIMER, OnTimer)
76 MESSAGE_HANDLER( WM_SIZE, OnSize)
77 MESSAGE_HANDLER( WM_SETFOCUS, OnFocus)
79 END_MSG_MAP()
81 LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
82 LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
83 LRESULT OnMouseAction(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
84 LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
85 LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
86 LRESULT OnFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */