xref: /AOO41X/main/bean/com/sun/star/beans/JavaWindowPeerFake.java (revision d4cc1e8c350bb591a80bbabe126ff6af34c125a2)
1*d4cc1e8cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d4cc1e8cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d4cc1e8cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d4cc1e8cSAndrew Rist  * distributed with this work for additional information
6*d4cc1e8cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d4cc1e8cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d4cc1e8cSAndrew Rist  * "License"); you may not use this file except in compliance
9*d4cc1e8cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*d4cc1e8cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*d4cc1e8cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d4cc1e8cSAndrew Rist  * software distributed under the License is distributed on an
15*d4cc1e8cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d4cc1e8cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*d4cc1e8cSAndrew Rist  * specific language governing permissions and limitations
18*d4cc1e8cSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*d4cc1e8cSAndrew Rist  *************************************************************/
21*d4cc1e8cSAndrew Rist 
22*d4cc1e8cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir package com.sun.star.beans;
25cdf0e10cSrcweir 
26cdf0e10cSrcweir import com.sun.star.awt.*;
27cdf0e10cSrcweir 
28cdf0e10cSrcweir /** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
29cdf0e10cSrcweir  *  @deprecated
30cdf0e10cSrcweir  */
31cdf0e10cSrcweir /* package */ class JavaWindowPeerFake
32cdf0e10cSrcweir 	implements XSystemDependentWindowPeer, XWindowPeer
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 	protected long hWindow;
36cdf0e10cSrcweir 	protected int localSystemType;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 	/** Create the faked window peer.
39cdf0e10cSrcweir 	 * @param _hWindow the system handle to the window.
40cdf0e10cSrcweir 	 * @param _systemType specifies the system type.
41cdf0e10cSrcweir 	 */
JavaWindowPeerFake(long _hWindow, int _systemType)42cdf0e10cSrcweir 	public JavaWindowPeerFake(long _hWindow, int _systemType)
43cdf0e10cSrcweir 	{
44cdf0e10cSrcweir 		hWindow = _hWindow;
45cdf0e10cSrcweir 		localSystemType = _systemType;
46cdf0e10cSrcweir 	}
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	/** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
49cdf0e10cSrcweir 	 *  This method is called back from the OpenOffice.org toolkit to retrieve the system data.
50cdf0e10cSrcweir 	 */
getWindowHandle( byte[] ProcessId, short SystemType)51cdf0e10cSrcweir     public Object getWindowHandle(/*IN*/byte[] ProcessId, /*IN*/short SystemType)
52cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
53cdf0e10cSrcweir 	{
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 		if (SystemType == localSystemType) {
56cdf0e10cSrcweir 			return new Integer((int)hWindow);
57cdf0e10cSrcweir 		}
58cdf0e10cSrcweir 		else return null;
59cdf0e10cSrcweir 	}
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	/** not really neaded.
62cdf0e10cSrcweir 	 */
getToolkit()63cdf0e10cSrcweir     public XToolkit getToolkit()
64cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
65cdf0e10cSrcweir 	{
66cdf0e10cSrcweir 		return null;
67cdf0e10cSrcweir 	}
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	/** not really neaded.
70cdf0e10cSrcweir 	 */
setPointer( XPointer Pointer)71cdf0e10cSrcweir     public void setPointer(/*IN*/XPointer Pointer)
72cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
73cdf0e10cSrcweir 	{
74cdf0e10cSrcweir 	}
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	/** not really neaded.
77cdf0e10cSrcweir 	 */
setBackground( int Color)78cdf0e10cSrcweir     public void setBackground(/*IN*/int Color)
79cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
80cdf0e10cSrcweir 	{
81cdf0e10cSrcweir 	}
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	/** not really neaded.
84cdf0e10cSrcweir 	 */
invalidate( short Flags)85cdf0e10cSrcweir     public void invalidate(/*IN*/short Flags)
86cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
87cdf0e10cSrcweir 	{
88cdf0e10cSrcweir 	}
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 	/** not really neaded.
91cdf0e10cSrcweir 	 */
invalidateRect( com.sun.star.awt.Rectangle Rect, short Flags)92cdf0e10cSrcweir     public void invalidateRect(/*IN*/com.sun.star.awt.Rectangle Rect, /*IN*/short Flags)
93cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
94cdf0e10cSrcweir 	{
95cdf0e10cSrcweir 	}
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 	/** not really neaded.
98cdf0e10cSrcweir 	 */
dispose()99cdf0e10cSrcweir     public void dispose()
100cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
101cdf0e10cSrcweir 	{
102cdf0e10cSrcweir 	}
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	/** not really neaded.
105cdf0e10cSrcweir 	 */
addEventListener( com.sun.star.lang.XEventListener xListener)106cdf0e10cSrcweir     public void addEventListener(/*IN*/com.sun.star.lang.XEventListener xListener)
107cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
108cdf0e10cSrcweir 	{
109cdf0e10cSrcweir 	}
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 	/** not really neaded.
112cdf0e10cSrcweir 	 */
removeEventListener( com.sun.star.lang.XEventListener aListener)113cdf0e10cSrcweir     public void removeEventListener(/*IN*/com.sun.star.lang.XEventListener aListener)
114cdf0e10cSrcweir 		throws com.sun.star.uno.RuntimeException
115cdf0e10cSrcweir 	{
116cdf0e10cSrcweir 	}
117cdf0e10cSrcweir }
118cdf0e10cSrcweir 
119