fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / avmedia / source / macavf / macavfcommon.hxx
blobd675bc34c50ecfe7352fbad1825172ce952c8a3e
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_AVMEDIA_SOURCE_MACAVF_MACAVFCOMMON_HXX
21 #define INCLUDED_AVMEDIA_SOURCE_MACAVF_MACAVFCOMMON_HXX
23 #include <premac.h>
24 #import <Cocoa/Cocoa.h>
25 #import <AVFoundation/AVFoundation.h>
26 #include <postmac.h>
28 #include <unordered_map>
30 #include <osl/mutex.hxx>
31 #include <rtl/ustring.hxx>
32 #include <tools/stream.hxx>
33 #include <tools/urlobj.hxx>
34 #include <cppuhelper/implbase1.hxx>
35 #include <cppuhelper/implbase2.hxx>
36 #include <cppuhelper/weak.hxx>
37 #include <cppuhelper/factory.hxx>
39 #include <com/sun/star/uno/Reference.h>
40 #include <com/sun/star/uno/RuntimeException.hpp>
41 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
42 #include <com/sun/star/lang/XComponent.hpp>
43 #include <com/sun/star/registry/XRegistryKey.hpp>
44 #include <com/sun/star/lang/XServiceInfo.hpp>
45 #include <com/sun/star/awt/Rectangle.hpp>
46 #include <com/sun/star/awt/KeyModifier.hpp>
47 #include <com/sun/star/awt/MouseButton.hpp>
48 #include <com/sun/star/media/XManager.hpp>
51 #define AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_MacAVF"
52 #define AVMEDIA_MACAVF_MANAGER_SERVICENAME "com.sun.star.media.Manager_MacAVF"
54 #define AVMEDIA_MACAVF_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_MacAVF"
55 #define AVMEDIA_MACAVF_PLAYER_SERVICENAME "com.sun.star.media.Player_MacAVF"
57 #define AVMEDIA_MACAVF_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_MacAVF"
58 #define AVMEDIA_MACAVF_WINDOW_SERVICENAME "com.sun.star.media.Window_MacAVF"
60 #define AVMEDIA_MACAVF_FRAMEGRABBER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.FrameGrabber_MacAVF"
61 #define AVMEDIA_MACAVF_FRAMEGRABBER_SERVICENAME "com.sun.star.media.FrameGrabber_MacAVF"
64 // MacAVObserver handles the notifications used in the AVFoundation framework
66 namespace avmedia { namespace macavf {
67 class MacAVObserverHandler;
68 } }
70 typedef std::unordered_map<NSObject*,avmedia::macavf::MacAVObserverHandler*> HandlersForObject;
72 @interface MacAVObserverObject : NSObject
74 HandlersForObject maHandlersForObject;
76 - (void)observeValueForKeyPath:(NSString*)pKeyPath ofObject:(id)pObject change:(NSDictionary*)pChangeDict context:(void*)pContext;
77 - (void)onNotification:(NSNotification*)pNotification;
78 @end
80 namespace avmedia { namespace macavf {
82 class MacAVObserverHandler
84 private:
85 static MacAVObserverObject* mpMacAVObserverObject;
86 public:
87 virtual ~MacAVObserverHandler() {}
88 static MacAVObserverObject* getObserver();
89 virtual bool handleObservation( NSString* pKeyPath ) = 0;
94 #endif // INCLUDED_AVMEDIA_SOURCE_MACAVF_MACAVFCOMMON_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */