|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gdk.Drawable
org.gnu.gdk.Window
A rectangular region on the screen. It's a low-level object, used
to implement high-level objects such as Widget
and
Window
on the GTK+ level. A Window
is a toplevel window, the thing a user might think of as a "window"
with a titlebar and so on; a Window
may contain
many Windows.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
Window(Handle handle)
|
|
Window(Window parent,
WindowAttr attributes,
int attributesMask)
|
Method Summary | |
void |
beginPaintRectangle(Rectangle rec)
Indicates that you are beginning the process of redrawing rec. |
void |
beginPaintRegion(Region region)
Indicates that you are beginning the process of redrawing region. |
void |
clear()
Clears an entire window to the background color or background pixmap. |
void |
clearArea(int x,
int y,
int width,
int height,
boolean exposeEvent)
|
void |
deiconify()
Asks to deiconify (ie unminimize) the specified window. |
void |
destroy()
|
void |
endPaint()
Indicates that the backing store created by the most recent call to beginPaintRegion() should be copied onscreen and deleted, leaving the next-most-recent backing store or no backing store at all as the active paint region. |
protected static Handle |
gdk_window_at_pointer(int winX,
int winY)
|
protected static void |
gdk_window_begin_move_drag(Handle window,
int button,
int rootX,
int rootY,
int timestamp)
|
protected static void |
gdk_window_begin_paint_rect(Handle window,
Handle rectangle)
|
protected static void |
gdk_window_begin_paint_region(Handle window,
Handle region)
|
protected static void |
gdk_window_begin_resize_drag(Handle window,
int edge,
int button,
int rootX,
int rootY,
int timestamp)
|
protected static void |
gdk_window_clear_area_e(Handle window,
int x,
int y,
int width,
int height)
|
protected static void |
gdk_window_clear_area(Handle window,
int x,
int y,
int width,
int height)
|
protected static void |
gdk_window_clear(Handle window)
|
protected static void |
gdk_window_constrain_size(int geometry,
int flags,
int width,
int height,
int[] newWidth,
int[] newHeight)
|
protected static void |
gdk_window_deiconify(Handle window)
|
protected static void |
gdk_window_destroy(Handle window)
|
protected static void |
gdk_window_end_paint(Handle window)
|
protected static void |
gdk_window_focus(Handle window)
|
protected static int |
gdk_window_foreign_new(int anid)
|
protected static void |
gdk_window_freeze_updates(Handle window)
|
protected static Handle[] |
gdk_window_get_children(Handle window)
|
protected static int |
gdk_window_get_events(Handle window)
|
protected static void |
gdk_window_get_frame_extents(Handle window,
Handle rect)
|
protected static void |
gdk_window_get_geometry(Handle window,
int[] x,
int[] y,
int[] width,
int[] height,
int[] depth)
|
protected static void |
gdk_window_get_internal_paint_info(Handle window,
Handle realDrawable,
int[] xOffset,
int[] yOffset)
|
protected static int |
gdk_window_get_origin(Handle window,
int[] x,
int[] y)
|
protected static Handle |
gdk_window_get_parent(Handle window)
|
protected static void |
gdk_window_get_position(Handle window,
int[] x,
int[] y)
|
protected static void |
gdk_window_get_root_origin(Handle window,
int[] x,
int[] y)
|
protected static int |
gdk_window_get_state(Handle window)
|
protected static Handle |
gdk_window_get_toplevel(Handle window)
|
protected static Handle |
gdk_window_get_toplevels()
|
protected static int |
gdk_window_get_update_area(Handle window)
|
protected static int |
gdk_window_get_window_type(Handle window)
|
protected static void |
gdk_window_hide(Handle window)
|
protected static void |
gdk_window_iconify(Handle window)
|
protected static void |
gdk_window_invalidate_rect(Handle window,
Handle rect,
boolean invalidateChildren)
|
protected static void |
gdk_window_invalidate_region(Handle window,
Handle region,
boolean invalidateChildren)
|
protected static boolean |
gdk_window_is_viewable(Handle window)
|
protected static boolean |
gdk_window_is_visible(Handle window)
|
protected static void |
gdk_window_lower(Handle window)
|
protected static void |
gdk_window_maximize(Handle window)
|
protected static void |
gdk_window_merge_child_shapes(Handle window)
|
protected static void |
gdk_window_move_resize(Handle window,
int x,
int y,
int width,
int height)
|
protected static void |
gdk_window_move(Handle window,
int x,
int y)
|
protected static Handle |
gdk_window_new(Handle parent,
Handle attriutes,
int attributesMask)
|
protected static Handle[] |
gdk_window_peek_children(Handle window)
|
protected static void |
gdk_window_process_all_updates()
|
protected static void |
gdk_window_process_updates(Handle window,
boolean updateChildren)
|
protected static void |
gdk_window_raise(Handle window)
|
protected static void |
gdk_window_register_dnd(Handle window)
|
protected static void |
gdk_window_reparent(Handle window,
Handle newParent,
int x,
int y)
|
protected static void |
gdk_window_resize(Handle window,
int width,
int height)
|
protected static void |
gdk_window_scroll(Handle window,
int dx,
int dy)
|
protected static void |
gdk_window_set_back_pixmap(Handle window,
Handle pixmap,
boolean parentRelative)
|
protected static void |
gdk_window_set_background(Handle window,
Handle color)
|
protected static void |
gdk_window_set_child_shapes(Handle window)
|
protected static void |
gdk_window_set_cursor(Handle window,
Handle cursor)
|
protected static void |
gdk_window_set_debug_updates(boolean setting)
|
protected static void |
gdk_window_set_decorations(Handle window,
int decorations)
|
protected static void |
gdk_window_set_events(Handle window,
int eventMask)
|
protected static void |
gdk_window_set_functions(Handle window,
int functions)
|
protected static void |
gdk_window_set_geometry_hints(Handle window,
Handle geometry,
int flags)
|
protected static void |
gdk_window_set_group(Handle window,
Handle leader)
|
protected static void |
gdk_window_set_icon_list(Handle window,
Handle[] pixbufs)
|
protected static void |
gdk_window_set_icon_name(Handle window,
java.lang.String name)
|
protected static void |
gdk_window_set_icon(Handle window,
Handle iconWindow,
Handle pixmap,
Handle mask)
|
protected static void |
gdk_window_set_modal_hint(Handle window,
boolean modal)
|
protected static void |
gdk_window_set_override_redirect(Handle window,
boolean overrideRedirect)
|
protected static void |
gdk_window_set_role(Handle window,
java.lang.String role)
|
protected static boolean |
gdk_window_set_static_gravities(Handle window,
boolean useStatic)
|
protected static void |
gdk_window_set_title(Handle window,
java.lang.String title)
|
protected static void |
gdk_window_set_transient_for(Handle window,
Handle leader)
|
protected static void |
gdk_window_set_type_hint(Handle window,
int hint)
|
protected static void |
gdk_window_set_user_data(Handle window,
java.lang.Object userData)
|
protected static void |
gdk_window_shape_combine_mask(Handle window,
Handle shape_mask,
int offsetX,
int offsetY)
|
protected static void |
gdk_window_shape_combine_region(Handle window,
Handle shape_region,
int offsetX,
int offsetY)
|
protected static void |
gdk_window_show_unraised(Handle window)
|
protected static void |
gdk_window_show(Handle window)
|
protected static void |
gdk_window_stick(Handle window)
|
protected static void |
gdk_window_thaw_updates(Handle window)
|
protected static void |
gdk_window_unmaximize(Handle window)
|
protected static void |
gdk_window_unstick(Handle window)
|
protected static void |
gdk_window_withdraw(Handle window)
|
Window[] |
getChildren()
Gets the list of children of window known to GDK. |
EventMask |
getEvents()
Gets the event mask for window. |
Rectangle |
getFrameExtents()
Obtains the bounding box of the window, including window manager titlebar/borders if any. |
int |
getHeight()
Retrieve the current height of the Window. |
void |
getKeyboardFocus()
|
Point |
getOrigin()
Obtains the position of a window in root window coordinates. |
Window |
getParent()
Obtains the parent of window, as known to GDK. |
Point |
getPosition()
Obtains the position of the window as reported in the most-recently-processed EventConfigure. |
Point |
getRootOrigin()
Obtains the top-left corner of the window manager frame in root window coordinates. |
Window |
getToplevel()
Gets the toplevel window that's an ancestor of this window. |
static Window[] |
getTopLevelWindows()
|
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
int |
getWidth()
Retrieve the current width of the Window. |
Window |
getWindowAt(int x,
int y)
Obtains the window underneath the mouse pointer, returning the location of that window in win_x, win_y. |
WindowState |
getWindowState()
|
void |
hide()
For toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won't be displayed. |
void |
iconify()
Asks to iconify (ie minimize) the specified window. |
boolean |
isViewable()
|
boolean |
isVisible()
|
void |
lower()
|
void |
maximize()
Asks to maximize window, so that it becomes full-screen. |
void |
mergeChildShapes()
|
void |
move(int x,
int y)
Repositions a window relative to its parent window. |
void |
moveAndResize(int x,
int y,
int width,
int height)
Equivalent to calling move() and
resize() , except that both operations are
performed at once, avoiding strange visual effects (ie the
user may be able to see the window first move, then resize,
if you don't use moveAndResize() ). |
void |
raise()
|
void |
reparent(Window parent,
int x,
int y)
Reparents window into the given parent . |
void |
resize(int width,
int height)
Resizes window; for toplevel windows, asks the window manager to resize the window. |
void |
scrollContent(int x,
int y)
|
void |
setBackground(Color color)
Sets the background color of a window. |
void |
setBackground(Pixmap pixmap,
boolean parentRelative)
Sets the background pixmap of window. |
void |
setBitmapMask(Bitmap mask,
int x,
int y)
|
void |
setChildMask(boolean masked)
|
void |
setCursor(Cursor cursor)
Sets the mouse pointer for a Window. |
void |
setEvents(EventMask mask)
The event mask for a window determines which events will be reported for that window. |
void |
setGeometryHints(Geometry geometry,
WindowHints hints)
Sets the geometry hints for a window. |
void |
setHint(WindowTypeHint hint)
|
void |
setIcon(Window icon,
Pixmap pixmap,
Bitmap mask)
Sets up the icon representing a Window. |
void |
setIconList(Pixbuf[] icons)
Sets up the icon representing a Window. |
void |
setIconName(java.lang.String name)
Sets the icon for the window from a named themed icon. |
void |
setModalHint(boolean modal)
The application can use this hint to tell the window manager that a certain window has modal behavior. |
void |
setRegionMask(Region region,
int x,
int y)
|
void |
setRole(java.lang.String role)
The window manager and session manager use a window's role to distinguish it from other kinds of window in the same application. |
boolean |
setStaticGravities(boolean useStatic)
Set the bit gravity of the given window to static, and flag it so all children get static subwindow gravity. |
void |
setTitle(java.lang.String title)
Sets the title of a toplevel window, to be displayed in the titlebar. |
void |
setTransientOf(Window parent)
Indicates to the window manager that the window is a transient dialog associated with the application window parent. |
void |
setUnmanaged(boolean unmanaged)
|
void |
show()
Raises the window to the top of the window stack (moves the window to the front of the Z-order). |
void |
showUnraised()
Shows a GdkWindow onscreen, but does not modify its stacking order. |
void |
stick()
Asks to stick window, which means that it will appear on all user desktops. |
void |
unmaximize()
Asks to unmaximize window. |
void |
unstick()
Asks to unstick window, which means that it will appear on only one of the user's desktops. |
void |
withdraw()
Withdraws a window (unmaps it and asks the window manager to forget about it). |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Window(Handle handle)
public Window(Window parent, WindowAttr attributes, int attributesMask)
Method Detail |
public void destroy()
public Window getWindowAt(int x, int y)
x
- X position of the window.y
- Y position of the window.
public void show()
window
to the top of the window stack (moves the window to the front of the Z-order).
public void hide()
public void withdraw()
public void showUnraised()
GdkWindow
onscreen, but does not modify its stacking order.
In contrast, show()
will raise the window to the top of the window stack.
public void move(int x, int y)
x
- new x position.y
- new y position.public void resize(int width, int height)
width
- the new window width.height
- the new window height.public void moveAndResize(int x, int y, int width, int height)
move()
and
resize()
, except that both operations are
performed at once, avoiding strange visual effects (ie the
user may be able to see the window first move, then resize,
if you don't use moveAndResize()
).
x
- the new x position.y
- the new y position.width
- the new width.height
- the new height.public void reparent(Window parent, int x, int y)
parent
.
The window being reparented will be unmapped as a side effect.
parent
- the new parent to move window into.x
- X location inside the new parent.y
- Y location inside the new parent.public void clear()
window
to the background color or background pixmap.
public void clearArea(int x, int y, int width, int height, boolean exposeEvent)
public void raise()
public void lower()
public void getKeyboardFocus()
public void setUnmanaged(boolean unmanaged)
public void scrollContent(int x, int y)
public void setBitmapMask(Bitmap mask, int x, int y)
public void setRegionMask(Region region, int x, int y)
public void setChildMask(boolean masked)
public void mergeChildShapes()
public boolean isVisible()
public boolean isViewable()
public WindowState getWindowState()
public void setHint(WindowTypeHint hint)
public static Window[] getTopLevelWindows()
public int getWidth()
public int getHeight()
public void setEvents(EventMask mask)
mask
- the new event mask.public EventMask getEvents()
setEvents(EventMask)
public boolean setStaticGravities(boolean useStatic)
useStatic
-
public void setModalHint(boolean modal)
modal
- public void setGeometryHints(Geometry geometry, WindowHints hints)
geometry
- hints
- public void beginPaintRectangle(Rectangle rec)
rec
- public void beginPaintRegion(Region region)
region
- public void endPaint()
public void setTitle(java.lang.String title)
title
- public void setRole(java.lang.String role)
role
- public void setTransientOf(Window parent)
parent
- public void setBackground(Color color)
color
- public void setBackground(Pixmap pixmap, boolean parentRelative)
pixmap
- parentRelative
- public void setCursor(Cursor cursor)
cursor
- public Point getPosition()
public Point getOrigin()
public Point getRootOrigin()
public Rectangle getFrameExtents()
public Window getParent()
public Window getToplevel()
public Window[] getChildren()
public void setIconList(Pixbuf[] icons)
This method allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.
Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them.
icons
- public void setIcon(Window icon, Pixmap pixmap, Bitmap mask)
The icon should be provided in whatever size it was naturally drawn; that is, don't scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
If you have your icon hand-drawn in multiple sizes, use setIconList(). Then the best size will be used.
icon
- pixmap
- mask
- public void setIconName(java.lang.String name)
IconTheme
for more details.
name
- public void iconify()
public void deiconify()
public void stick()
public void unstick()
public void maximize()
public void unmaximize()
public static Type getType()
protected static final Handle gdk_window_new(Handle parent, Handle attriutes, int attributesMask)
protected static final int gdk_window_get_window_type(Handle window)
protected static final void gdk_window_destroy(Handle window)
protected static final Handle gdk_window_at_pointer(int winX, int winY)
protected static final void gdk_window_show(Handle window)
protected static final void gdk_window_hide(Handle window)
protected static final void gdk_window_withdraw(Handle window)
protected static final void gdk_window_show_unraised(Handle window)
protected static final void gdk_window_move(Handle window, int x, int y)
protected static final void gdk_window_resize(Handle window, int width, int height)
protected static final void gdk_window_move_resize(Handle window, int x, int y, int width, int height)
protected static final void gdk_window_reparent(Handle window, Handle newParent, int x, int y)
protected static final void gdk_window_clear(Handle window)
protected static final void gdk_window_clear_area(Handle window, int x, int y, int width, int height)
protected static final void gdk_window_clear_area_e(Handle window, int x, int y, int width, int height)
protected static final void gdk_window_raise(Handle window)
protected static final void gdk_window_lower(Handle window)
protected static final void gdk_window_focus(Handle window)
protected static final void gdk_window_set_user_data(Handle window, java.lang.Object userData)
protected static final void gdk_window_set_override_redirect(Handle window, boolean overrideRedirect)
protected static final void gdk_window_scroll(Handle window, int dx, int dy)
protected static final void gdk_window_shape_combine_mask(Handle window, Handle shape_mask, int offsetX, int offsetY)
protected static final void gdk_window_shape_combine_region(Handle window, Handle shape_region, int offsetX, int offsetY)
protected static final void gdk_window_set_child_shapes(Handle window)
protected static final void gdk_window_merge_child_shapes(Handle window)
protected static final boolean gdk_window_is_visible(Handle window)
protected static final boolean gdk_window_is_viewable(Handle window)
protected static final int gdk_window_get_state(Handle window)
protected static final boolean gdk_window_set_static_gravities(Handle window, boolean useStatic)
protected static final int gdk_window_foreign_new(int anid)
protected static final void gdk_window_set_type_hint(Handle window, int hint)
protected static final void gdk_window_set_modal_hint(Handle window, boolean modal)
protected static final void gdk_window_set_geometry_hints(Handle window, Handle geometry, int flags)
protected static final void gdk_window_begin_paint_rect(Handle window, Handle rectangle)
protected static final void gdk_window_begin_paint_region(Handle window, Handle region)
protected static final void gdk_window_end_paint(Handle window)
protected static final void gdk_window_set_title(Handle window, java.lang.String title)
protected static final void gdk_window_set_role(Handle window, java.lang.String role)
protected static final void gdk_window_set_transient_for(Handle window, Handle leader)
protected static final void gdk_window_set_background(Handle window, Handle color)
protected static final void gdk_window_set_back_pixmap(Handle window, Handle pixmap, boolean parentRelative)
protected static final void gdk_window_set_cursor(Handle window, Handle cursor)
protected static final void gdk_window_get_geometry(Handle window, int[] x, int[] y, int[] width, int[] height, int[] depth)
protected static final void gdk_window_get_position(Handle window, int[] x, int[] y)
protected static final int gdk_window_get_origin(Handle window, int[] x, int[] y)
protected static final void gdk_window_get_root_origin(Handle window, int[] x, int[] y)
protected static final void gdk_window_get_frame_extents(Handle window, Handle rect)
protected static final Handle gdk_window_get_parent(Handle window)
protected static final Handle gdk_window_get_toplevel(Handle window)
protected static final Handle[] gdk_window_get_children(Handle window)
protected static final Handle[] gdk_window_peek_children(Handle window)
protected static final int gdk_window_get_events(Handle window)
protected static final void gdk_window_set_events(Handle window, int eventMask)
protected static final void gdk_window_set_icon_list(Handle window, Handle[] pixbufs)
protected static final void gdk_window_set_icon(Handle window, Handle iconWindow, Handle pixmap, Handle mask)
protected static final void gdk_window_set_icon_name(Handle window, java.lang.String name)
protected static final void gdk_window_set_group(Handle window, Handle leader)
protected static final void gdk_window_set_decorations(Handle window, int decorations)
protected static final void gdk_window_set_functions(Handle window, int functions)
protected static final Handle gdk_window_get_toplevels()
protected static final void gdk_window_iconify(Handle window)
protected static final void gdk_window_deiconify(Handle window)
protected static final void gdk_window_stick(Handle window)
protected static final void gdk_window_unstick(Handle window)
protected static final void gdk_window_maximize(Handle window)
protected static final void gdk_window_unmaximize(Handle window)
protected static final void gdk_window_register_dnd(Handle window)
protected static final void gdk_window_begin_resize_drag(Handle window, int edge, int button, int rootX, int rootY, int timestamp)
protected static final void gdk_window_begin_move_drag(Handle window, int button, int rootX, int rootY, int timestamp)
protected static final void gdk_window_invalidate_rect(Handle window, Handle rect, boolean invalidateChildren)
protected static final void gdk_window_invalidate_region(Handle window, Handle region, boolean invalidateChildren)
protected static final int gdk_window_get_update_area(Handle window)
protected static final void gdk_window_freeze_updates(Handle window)
protected static final void gdk_window_thaw_updates(Handle window)
protected static final void gdk_window_process_all_updates()
protected static final void gdk_window_process_updates(Handle window, boolean updateChildren)
protected static final void gdk_window_set_debug_updates(boolean setting)
protected static final void gdk_window_constrain_size(int geometry, int flags, int width, int height, int[] newWidth, int[] newHeight)
protected static final void gdk_window_get_internal_paint_info(Handle window, Handle realDrawable, int[] xOffset, int[] yOffset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |