01: /*
02: * @(#)WindowManagementFeedback.java 1.13 06/10/10
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: package sun.porting.windowsystem;
29:
30: /**
31: * The <code>WindowManagementFeedback</code> interface
32: * allows the toolkit to implement some means of interactive window
33: * movement for top-level windows. The window system or graphics library
34: * may implement the feedback for these operations by a platform-specific means;
35: * it then exposes the functionality safely through this interface.
36: *
37: * @version 1.8, 08/19/02
38: */
39: public interface WindowManagementFeedback {
40: /**
41: * Start window management feedback using a rectangle of the given
42: * dimensions. All coordinates are in global (framebuffer) space.
43: * @param win The window to be reshaped. (This allows the window system
44: * to show the whole window during moves and/or reshapes).
45: * @param x x coordinate of the feedback rectangle's upper-left corner.
46: * @param y y coordinate of the feedback rectangle's upper-left corner.
47: * @param w Width of the feedback rectangle.
48: * @param h Height of the feedback rectangle.
49: * @throws IllegalStateException if feedback is already in progress.
50: * @throws IllegalArgumentException if win is not a top-level window.
51: */
52: void startFeedback(Window win, int x, int y, int w, int h)
53: throws IllegalStateException, IllegalArgumentException;
54:
55: /**
56: * Resize the feedback rectangle to the given dimensions.
57: * @param win The window to be reshaped. (This allows the window system
58: * to show the whole window during moves and/or reshapes).
59: * @param x x coordinate of the feedback rectangle's upper-left corner.
60: * @param y y coordinate of the feedback rectangle's upper-left corner.
61: * @param w Width of the feedback rectangle.
62: * @param h Height of the feedback rectangle.
63: * @throws IllegalStateException if no feedback is in progress.
64: * @throws IllegalArgumentException if win is not the same window
65: * passed to startFeedback.
66: */
67: void moveFeedback(Window win, int x, int y, int w, int h)
68: throws IllegalStateException, IllegalArgumentException;
69:
70: /**
71: * End feedback, e.g. hide the feedback rectangle.
72: * @param win The window to be reshaped. (This allows the window system
73: * to show the whole window during moves and/or reshapes).
74: * @param x x coordinate of the feedback rectangle's upper-left corner.
75: * @param y y coordinate of the feedback rectangle's upper-left corner.
76: * @param w Width of the feedback rectangle.
77: * @param h Height of the feedback rectangle.
78: * @throws IllegalStateException if no feedback is in progress.
79: * @throws IllegalArgumentException if win is not the same window
80: * passed to startFeedback.
81: */
82: void endFeedback(Window win, int x, int y, int w, int h)
83: throws IllegalStateException, IllegalArgumentException;
84: }
|