summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KRootPixmap.java
blob: c8fec50394ae89b9de36df8ca96cb685792b2371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQColor;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQObject;
import org.kde.qt.TQPixmap;
import org.kde.qt.TQEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQObject;

/**

 Creates pseudo-transparent widgets.
 A pseudo-transparent widget is a widget with its background pixmap set to
 that part of the desktop background that it is currently obscuring. This
 gives a transparency effect.
 To create a transparent widget, construct a KRootPixmap and pass it a
 pointer to your widget. That's it! Moving, resizing and background changes
 are handled automatically.
 Instead of using the default behavior, you can ask KRootPixmap
 to emit a backgroundUpdated(TQPixmap) signal whenever
 the background needs updating by using setCustomPainting(boolean).
 Alternatively by reimplementing updateBackground(KSharedPixmap)
 you can take complete control of the behavior.
 See {@link KRootPixmapSignals} for signals emitted by KRootPixmap
		@author Geert Jansen <jansen@kde.org>

		@version $Id$
 
		@short    Creates pseudo-transparent widgets.

*/
public class KRootPixmap extends TQObject  {
	protected KRootPixmap(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructs a KRootPixmap. The KRootPixmap will be created as a child
		 of the target widget so it will be deleted automatically when the
		 widget is destroyed.
			@param target A pointer to the widget that you want to make pseudo
		 transparent.
			@param name The internal name of the pixmap
		     		@short    Constructs a KRootPixmap.
	*/
	public KRootPixmap(TQWidget target, String name) {
		super((Class) null);
		newKRootPixmap(target,name);
	}
	private native void newKRootPixmap(TQWidget target, String name);
	public KRootPixmap(TQWidget target) {
		super((Class) null);
		newKRootPixmap(target);
	}
	private native void newKRootPixmap(TQWidget target);
	/**	
		 Constructs a KRootPixmap where the parent TQObject and target TQWidget are
		 different.
		     		@short    Constructs a KRootPixmap where the parent TQObject and target TQWidget are  different.
	*/
	public KRootPixmap(TQWidget target, TQObject parent, String name) {
		super((Class) null);
		newKRootPixmap(target,parent,name);
	}
	private native void newKRootPixmap(TQWidget target, TQObject parent, String name);
	public KRootPixmap(TQWidget target, TQObject parent) {
		super((Class) null);
		newKRootPixmap(target,parent);
	}
	private native void newKRootPixmap(TQWidget target, TQObject parent);
	/**	
		 Checks if pseudo-transparency is available.
				@return <code>true</code> if transparency is available, <code>false</code> otherwise.
     
		@short    Checks if pseudo-transparency is available.
	*/
	public native boolean isAvailable();
	/**	
		 Returns true if the KRootPixmap is active.
		     		@short    Returns true if the KRootPixmap is active.
	*/
	public native boolean isActive();
	/**	
		 Returns the number of the current desktop.
		     		@short    Returns the number of the current desktop.
	*/
	public native int currentDesktop();
	/**	
		 Returns true if custom painting is enabled, false otherwise.
				@short    Returns true if custom painting is enabled, false otherwise.
		@see #setCustomPainting(boolean)
	*/
	public native boolean customPainting();
	/**	 @since 3.2
				@return the fade color.
     
		@short   @since 3.
	*/
	public native TQColor color();
	/**	 @since 3.2
				@return the color opacity.
     
		@short   @since 3.
	*/
	public native double opacity();
	/**	
		 Starts background handling.
		     		@short    Starts background handling.
	*/
	public native void start();
	/**	
		 Stops background handling.
		     		@short    Stops background handling.
	*/
	public native void stop();
	/**	
		 Sets the fade effect.
			 This effect will fade the background to the
		 specified color.
			@param opacity A value between 0 and 1, indicating the opacity
		 of the color. A value of 0 will not change the image, a value of 1
		 will use the fade color unchanged.
			@param color The color to fade to.
		     		@short    Sets the fade effect.
	*/
	public native void setFadeEffect(double opacity, TQColor color);
	/**	
		 Repaints the widget background. Normally, you shouldn't need this
		 as it is handled automatically.
			@param force Force a repaint, even if the contents did not change.
		     		@short    Repaints the widget background.
	*/
	public native void repaint(boolean force);
	/**	
		 Repaints the widget background. Normally, you shouldn't need this
		 as it is handled automatically. This is equivalent to calling
		 repaint( false ).
		     		@short    Repaints the widget background.
	*/
	public native void repaint();
	/**	
		 Enables custom handling of the background painting. If custom
		 painting is enabled then KRootPixmap will emit a
		 backgroundUpdated() signal when the background for the
		 target widget changes, instead of applying the new background.
		     		@short    Enables custom handling of the background painting.
	*/
	public native void setCustomPainting(boolean enable);
	/**	
		 Asks KDesktop to export the desktop background as a KSharedPixmap.
		 This method uses DCOP to call KBackgroundIface/setExport(int).
		     		@short    Asks KDesktop to export the desktop background as a KSharedPixmap.
	*/
	public native void enableExports();
	/**	
		 Returns the name of the shared pixmap (only needed for low level access)
		     		@short    Returns the name of the shared pixmap (only needed for low level access)
	*/
	public static native String pixmapName(int desk);
	/**	
		 Reimplemented to filter the events from the target widget and
		 track its movements.
		     		@short    Reimplemented to filter the events from the target widget and  track its movements.
	*/
	public native boolean eventFilter(TQObject arg1, TQEvent arg2);
	/**	
		 Called when the pixmap has been updated. The default implementation
		 applies the fade effect, then sets the target's background, or emits
		 backgroundUpdated(TQPixmap) depending on the painting mode.
		     		@short    Called when the pixmap has been updated.
	*/
	// void updateBackground(KSharedPixmap* arg1); >>>> NOT CONVERTED
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}