Details
struct GdkWindowAttr
struct GdkWindowAttr
{
gchar *title;
gint event_mask;
gint x, y;
gint width;
gint height;
GdkWindowClass wclass;
GdkVisual *visual;
GdkColormap *colormap;
GdkWindowType window_type;
GdkCursor *cursor;
gchar *wmclass_name;
gchar *wmclass_class;
gboolean override_redirect;
}; |
struct GdkWindow
struct GdkPixmap
{
gpointer user_data;
}; |
enum GdkWindowType
typedef enum
{
GDK_WINDOW_ROOT,
GDK_WINDOW_TOPLEVEL,
GDK_WINDOW_CHILD,
GDK_WINDOW_DIALOG,
GDK_WINDOW_TEMP,
GDK_WINDOW_FOREIGN
} GdkWindowType; |
enum GdkWindowClass
typedef enum
{
GDK_INPUT_OUTPUT,
GDK_INPUT_ONLY
} GdkWindowClass; |
enum GdkWindowAttributesType
typedef enum
{
GDK_WA_TITLE = 1 << 1,
GDK_WA_X = 1 << 2,
GDK_WA_Y = 1 << 3,
GDK_WA_CURSOR = 1 << 4,
GDK_WA_COLORMAP = 1 << 5,
GDK_WA_VISUAL = 1 << 6,
GDK_WA_WMCLASS = 1 << 7,
GDK_WA_NOREDIR = 1 << 8
} GdkWindowAttributesType; |
enum GdkWindowHints
typedef enum
{
GDK_HINT_POS = 1 << 0,
GDK_HINT_MIN_SIZE = 1 << 1,
GDK_HINT_MAX_SIZE = 1 << 2,
GDK_HINT_BASE_SIZE = 1 << 3,
GDK_HINT_ASPECT = 1 << 4,
GDK_HINT_RESIZE_INC = 1 << 5,
GDK_HINT_WIN_GRAVITY = 1 << 6,
GDK_HINT_USER_POS = 1 << 7,
GDK_HINT_USER_SIZE = 1 << 8
} GdkWindowHints; |
struct GdkGeometry
struct GdkGeometry
{
gint min_width;
gint min_height;
gint max_width;
gint max_height;
gint base_width;
gint base_height;
gint width_inc;
gint height_inc;
gdouble min_aspect;
gdouble max_aspect;
GdkGravity win_gravity;
}; |
enum GdkGravity
typedef enum
{
GDK_GRAVITY_NORTH_WEST = 1,
GDK_GRAVITY_NORTH,
GDK_GRAVITY_NORTH_EAST,
GDK_GRAVITY_WEST,
GDK_GRAVITY_CENTER,
GDK_GRAVITY_EAST,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_SOUTH,
GDK_GRAVITY_SOUTH_EAST,
GDK_GRAVITY_STATIC
} GdkGravity; |
enum GdkWindowEdge
typedef enum
{
GDK_WINDOW_EDGE_NORTH_WEST,
GDK_WINDOW_EDGE_NORTH,
GDK_WINDOW_EDGE_NORTH_EAST,
GDK_WINDOW_EDGE_WEST,
GDK_WINDOW_EDGE_EAST,
GDK_WINDOW_EDGE_SOUTH_WEST,
GDK_WINDOW_EDGE_SOUTH,
GDK_WINDOW_EDGE_SOUTH_EAST
} GdkWindowEdge; |
enum GdkWindowTypeHint
typedef enum
{
GDK_WINDOW_TYPE_HINT_NORMAL,
GDK_WINDOW_TYPE_HINT_DIALOG,
GDK_WINDOW_TYPE_HINT_MENU,
GDK_WINDOW_TYPE_HINT_TOOLBAR
} GdkWindowTypeHint; |
gdk_window_get_window_type ()
gdk_window_is_viewable ()
gdk_window_get_state ()
Gets the bitwise OR of the currently active window state flags,
from the GdkWindowState enumeration.
gdk_window_withdraw ()
void gdk_window_withdraw (GdkWindow *window); |
gdk_window_deiconify ()
void gdk_window_deiconify (GdkWindow *window); |
gdk_window_maximize ()
void gdk_window_maximize (GdkWindow *window); |
gdk_window_unmaximize ()
void gdk_window_unmaximize (GdkWindow *window); |
gdk_window_move_resize ()
gdk_window_scroll ()
Scroll the contents of its window, both pixels and children, by
the given amount. Portions of the window that the scroll operation
brings in from offscreen areas are invalidated. The invalidated
region may be bigger than what would strictly be necessary.
(For X11, a minimum area will be invalidated if the window has
no subwindows, or if the edges of the window's parent do not extend
beyond the edges of the window. In other cases, a multi-step process
is used to scroll the window which may produce temporary visual
artifacts and unnecessary invalidations.)
gdk_window_clear_area_e ()
gdk_window_copy_area()
#define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) |
gdk_window_register_dnd ()
void gdk_window_register_dnd (GdkWindow *window); |
gdk_window_begin_resize_drag ()
gdk_window_begin_move_drag ()
gdk_window_constrain_size ()
Constrains a desired width and height according to a
set of geometry hints (such as minimum and maximum size).
gdk_window_begin_paint_region ()
Indicates that you are beginning the process of redrawing region.
A backing store (offscreen buffer) large enough to contain region
will be created. The backing store will be initialized with the
background color or background pixmap for window. Then, all
drawing operations performed on window will be diverted to the
backing store. When you call gdk_window_end_paint(), the backing
store will be copied to window, making it visible onscreen. Only
the part of window contained in region will be modified; that is,
drawing operations are clipped to region.
The net result of all this is to remove flicker, because the user
sees the finished product appear all at once when you call
gdk_window_end_paint(). If you draw to window directly without
calling gdk_window_begin_paint_region(), the user may see flicker
as individual drawing operations are performed in sequence. The
clipping and background-initializing features of
gdk_window_begin_paint_region() are conveniences for the
programmer, so you can avoid doing that work yourself.
When using GTK+, the widget system automatically places calls to
gdk_window_begin_paint_region() and gdk_window_end_paint() around
emissions of the expose_event signal. That is, if you're writing an
expose event handler, you can assume that the exposed area in
GdkEventExpose has already been cleared to the window background,
is already set as the clip region, and already has a backing store.
Therefore in most cases, application code need not call
gdk_window_begin_paint_region(). (You can disable the automatic
calls around expose events on a widget-by-widget basis by calling
gtk_widget_set_double_buffered().)
If you call this function multiple times before calling the
matching gdk_window_end_paint(), the backing stores are pushed onto
a stack. gdk_window_end_paint() copies the topmost backing store
onscreen, subtracts the topmost region from all other regions in
the stack, and pops the stack. All drawing operations affect only
the topmost backing store in the stack. One matching call to
gdk_window_end_paint() is required for each call to
gdk_window_begin_paint_region().
gdk_window_invalidate_region ()
Adds region to the update area for window. The update area is the
region that needs to be redrawn, or "dirty region." The call
gdk_window_process_updates() sends one or more expose events to the
window, which together cover the entire update area. An
application would normally redraw the contents of window in
response to those expose events.
GDK will call gdk_window_process_all_updates() on your behalf
whenever your program returns to the main loop and becomes idle, so
normally there's no need to do that manually, you just need to
invalidate regions that you know should be redrawn.
The invalidate_children parameter controls whether the region of
each child window that intersects region will also be invalidated.
If FALSE, then the update area for child windows will remain
unaffected.
gdk_window_get_update_area ()
Transfers ownership of the update area from window to the caller
of the function. That is, after calling this function, window will
no longer have an invalid/dirty region; the update area is removed
from window and handed to you. If a window has no update area,
gdk_window_get_update_area() returns NULL. You are responsible for
calling gdk_region_destroy() on the returned region if it's non-NULL.
gdk_window_freeze_updates ()
void gdk_window_freeze_updates (GdkWindow *window); |
gdk_window_thaw_updates ()
void gdk_window_thaw_updates (GdkWindow *window); |
gdk_window_process_updates ()
Sends one or more expose events to window. The areas in each
expose event will cover the entire update area for the window (see
gdk_window_invalidate_region() for details). Normally GDK calls
gdk_window_process_all_updates() on your behalf, so there's no
need to call this function unless you want to force expose events
to be delivered immediately and synchronously (vs. the usual
case, where GDK delivers them in an idle handler). Occasionally
this is useful to produce nicer scrolling behavior, for example.
gdk_window_set_debug_updates ()
void gdk_window_set_debug_updates (gboolean setting); |
With update debugging enabled, calls to
gdk_window_invalidate_region() clear the invalidated region of the
screen to a noticeable color, and GDK pauses for a short time
before sending exposes to windows during
gdk_window_process_updates(). The net effect is that you can see
the invalid region for each window and watch redraws as they
occur. This allows you to diagnose inefficiencies in your application.
In essence, because the GDK rendering model prevents all flicker,
if you are redrawing the same region 400 times you may never
notice, aside from noticing a speed problem. Enabling update
debugging causes GTK to flicker slowly and noticeably, so you can
see exactly what's being redrawn when, in what order.
The --gtk-debug=updates command line option passed to GTK+ programs
enables this debug option at application startup time. That's
usually more useful than calling gdk_window_set_debug_updates()
yourself, though you might want to use this function to enable
updates sometime after application startup time.
gdk_window_set_user_data ()
gdk_window_set_override_redirect ()
void gdk_window_set_override_redirect
(GdkWindow *window,
gboolean override_redirect); |
gdk_window_remove_filter ()
enum GdkFilterReturn
typedef enum {
GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
GDK_FILTER_TRANSLATE, /* Translated event stored */
GDK_FILTER_REMOVE /* Terminate processing, removing event */
} GdkFilterReturn; |
GdkXEvent
typedef void GdkXEvent; /* Can be cast to window system specific |
gdk_window_shape_combine_mask ()
gdk_window_shape_combine_region ()
gdk_window_set_child_shapes ()
void gdk_window_set_child_shapes (GdkWindow *window); |
gdk_window_merge_child_shapes ()
void gdk_window_merge_child_shapes (GdkWindow *window); |
gdk_window_set_static_gravities ()
gdk_window_set_background ()
gdk_window_set_back_pixmap ()
GDK_PARENT_RELATIVE
#define GDK_PARENT_RELATIVE 1L |
gdk_window_set_colormap
#define gdk_window_set_colormap |
gdk_window_get_user_data ()
gdk_window_get_geometry ()
gdk_window_set_geometry_hints ()
gdk_window_set_icon_list ()
Sets a list of icons for the window. One of these will be used
to represent the window when it has been iconified. The icon is
usually shown in an icon box or some sort of task bar. Which icon
size is shown depends on the window manager. The window manager
can scale the icon but setting several size icons can give better
image quality since the window manager may only need to scale the
icon by a small amount or not at all.
gdk_window_set_modal_hint ()
The application can use this hint to tell the window manager
that a certain window has modal behaviour. The window manager
can use this information to handle modal windows in a special
way.
You should only use this on windows for which you have
previously called #gdk_window_set_transient_for()
gdk_window_set_type_hint ()
The application can use this call to provide a hint to the window
manager about the functionality of a window. The window manager
can use this information when determining the decoration and behaviour
of the window.
The hint must be set before the window is mapped.
gdk_window_get_position ()
gdk_window_get_root_origin ()
Obtains the top-left corner of the window manager frame in root
window coordinates.
gdk_window_get_frame_extents ()
Obtains the bounding box of the window, including window manager
titlebar/borders if any. The frame position is given in root window
coordinates. To get the position of the window itself (rather than
the frame) in root window coordinates, use gdk_window_get_origin().
gdk_window_get_size
#define gdk_window_get_size |
gdk_window_get_visual
#define gdk_window_get_visual |
gdk_window_get_colormap
#define gdk_window_get_colormap |
gdk_window_get_type
#define gdk_window_get_type |
gdk_window_get_deskrelative_origin ()
This gets the origin of a GdkWindow relative to
an Enlightenment-window-manager desktop. As long as you don't
assume that the user's desktop/workspace covers the entire
root window (i.e. you don't assume that the desktop begins
at root window coordinate 0,0) this function is not necessary.
It's deprecated for that reason.
gdk_window_get_pointer ()
enum GdkModifierType
typedef enum
{
GDK_SHIFT_MASK = 1 << 0,
GDK_LOCK_MASK = 1 << 1,
GDK_CONTROL_MASK = 1 << 2,
GDK_MOD1_MASK = 1 << 3,
GDK_MOD2_MASK = 1 << 4,
GDK_MOD3_MASK = 1 << 5,
GDK_MOD4_MASK = 1 << 6,
GDK_MOD5_MASK = 1 << 7,
GDK_BUTTON1_MASK = 1 << 8,
GDK_BUTTON2_MASK = 1 << 9,
GDK_BUTTON3_MASK = 1 << 10,
GDK_BUTTON4_MASK = 1 << 11,
GDK_BUTTON5_MASK = 1 << 12,
/* The next few modifiers are used by XKB, so we skip to the end
*/
GDK_RELEASE_MASK = 1u << 31,
GDK_MODIFIER_MASK = GDK_RELEASE_MASK | 0x1fff
} GdkModifierType; |
gdk_window_get_toplevel ()
gdk_window_get_children ()
gdk_window_peek_children ()
gdk_window_set_icon_name ()
gdk_window_set_transient_for ()
gdk_window_set_decorations ()
enum GdkWMDecoration
typedef enum
{
GDK_DECOR_ALL = 1 << 0,
GDK_DECOR_BORDER = 1 << 1,
GDK_DECOR_RESIZEH = 1 << 2,
GDK_DECOR_TITLE = 1 << 3,
GDK_DECOR_MENU = 1 << 4,
GDK_DECOR_MINIMIZE = 1 << 5,
GDK_DECOR_MAXIMIZE = 1 << 6
} GdkWMDecoration; |
gdk_window_set_functions ()
enum GdkWMFunction
typedef enum
{
GDK_FUNC_ALL = 1 << 0,
GDK_FUNC_RESIZE = 1 << 1,
GDK_FUNC_MOVE = 1 << 2,
GDK_FUNC_MINIMIZE = 1 << 3,
GDK_FUNC_MAXIMIZE = 1 << 4,
GDK_FUNC_CLOSE = 1 << 5
} GdkWMFunction; |
gdk_window_get_toplevels ()
GList* gdk_window_get_toplevels (void); |