* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#ifndef __GDK_WINDOW_H__
+#define __GDK_WINDOW_H__
+
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
-#ifndef __GDK_WINDOW_H__
-#define __GDK_WINDOW_H__
-
+#include <gdk/gdkversionmacros.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
+#include <gdk/gdkframeclock.h>
G_BEGIN_DECLS
typedef struct _GdkGeometry GdkGeometry;
typedef struct _GdkWindowAttr GdkWindowAttr;
-typedef struct _GdkPointerHooks GdkPointerHooks;
typedef struct _GdkWindowRedirect GdkWindowRedirect;
/**
*/
typedef enum
{
- GDK_INPUT_OUTPUT,
- GDK_INPUT_ONLY
+ GDK_INPUT_OUTPUT, /*< nick=input-output >*/
+ GDK_INPUT_ONLY /*< nick=input-only >*/
} GdkWindowWindowClass;
/**
GDK_WINDOW_EDGE_SOUTH_EAST
} GdkWindowEdge;
+/**
+ * GdkFullscreenMode:
+ * @GDK_FULLSCREEN_ON_CURRENT_MONITOR: Fullscreen on current monitor only.
+ * @GDK_FULLSCREEN_ON_ALL_MONITORS: Span across all monitors when fullscreen.
+ *
+ * Indicates which monitor (in a multi-head setup) a window should span over
+ * when in fullscreen mode.
+ *
+ * Since: 3.8
+ **/
+typedef enum
+{
+ GDK_FULLSCREEN_ON_CURRENT_MONITOR,
+ GDK_FULLSCREEN_ON_ALL_MONITORS
+} GdkFullscreenMode;
+
/**
* GdkWindowAttr:
* @title: title of the window (for toplevel windows)
GdkGravity win_gravity;
};
-/**
- * GdkPointerHooks:
- * @get_pointer: Obtains the current pointer position and modifier state.
- * The position is given in coordinates relative to the window containing
- * the pointer, which is returned in @window.
- * @window_at_pointer: Obtains the window underneath the mouse pointer,
- * returning the location of that window in @win_x, @win_y. Returns %NULL
- * if the window under the mouse pointer is not known to GDK (for example,
- * belongs to another application).
- *
- * A table of pointers to functions for getting quantities related to
- * the current pointer position. GDK has one global table of this type,
- * which can be set using gdk_set_pointer_hooks().
- *
- * This is only useful for such low-level tools as an event recorder.
- * Applications should never have any reason to use this facility
- */
-struct _GdkPointerHooks
-{
- GdkWindow* (*get_pointer) (GdkWindow *window,
- gint *x,
- gint *y,
- GdkModifierType *mask);
- GdkWindow* (*window_at_pointer) (GdkScreen *screen, /* unused */
- gint *win_x,
- gint *win_y);
-};
-
typedef struct _GdkWindowClass GdkWindowClass;
#define GDK_TYPE_WINDOW (gdk_window_get_type ())
GdkScreen * gdk_window_get_screen (GdkWindow *window);
GdkDisplay * gdk_window_get_display (GdkWindow *window);
#ifndef GDK_MULTIDEVICE_SAFE
+GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position)
GdkWindow* gdk_window_at_pointer (gint *win_x,
gint *win_y);
#endif /* GDK_MULTIDEVICE_SAFE */
* window gravity on all children.
*/
gboolean gdk_window_set_static_gravities (GdkWindow *window,
- gboolean use_static);
-
-/* Functions to create/lookup windows from their native equivalents */
-#ifndef GDK_MULTIHEAD_SAFE
-GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid);
-GdkWindow* gdk_window_lookup (GdkNativeWindow anid);
-#endif
-GdkWindow *gdk_window_foreign_new_for_display (GdkDisplay *display,
- GdkNativeWindow anid);
-GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display,
- GdkNativeWindow anid);
-
+ gboolean use_static);
/* GdkWindow */
void gdk_window_set_geometry_hints (GdkWindow *window,
const GdkGeometry *geometry,
GdkWindowHints geom_mask);
-void gdk_set_sm_client_id (const gchar *sm_client_id);
cairo_region_t *gdk_window_get_clip_region (GdkWindow *window);
cairo_region_t *gdk_window_get_visible_region(GdkWindow *window);
const gchar *startup_id);
void gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent);
+GDK_DEPRECATED_IN_3_4_FOR(gdk_window_set_background_rgba)
void gdk_window_set_background (GdkWindow *window,
const GdkColor *color);
-void gdk_window_set_background_rgba (GdkWindow *window,
- GdkRGBA *rgba);
+void gdk_window_set_background_rgba (GdkWindow *window,
+ const GdkRGBA *rgba);
void gdk_window_set_background_pattern (GdkWindow *window,
cairo_pattern_t *pattern);
cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
GdkRectangle *rect);
#ifndef GDK_MULTIDEVICE_SAFE
-GdkWindow* gdk_window_get_pointer (GdkWindow *window,
- gint *x,
- gint *y,
- GdkModifierType *mask);
+GDK_DEPRECATED_IN_3_0_FOR(gdk_window_get_device_position)
+GdkWindow * gdk_window_get_pointer (GdkWindow *window,
+ gint *x,
+ gint *y,
+ GdkModifierType *mask);
#endif /* GDK_MULTIDEVICE_SAFE */
GdkWindow * gdk_window_get_device_position (GdkWindow *window,
GdkDevice *device,
void gdk_window_maximize (GdkWindow *window);
void gdk_window_unmaximize (GdkWindow *window);
void gdk_window_fullscreen (GdkWindow *window);
+GDK_AVAILABLE_IN_3_8
+void gdk_window_set_fullscreen_mode (GdkWindow *window,
+ GdkFullscreenMode mode);
+GDK_AVAILABLE_IN_3_8
+GdkFullscreenMode
+ gdk_window_get_fullscreen_mode (GdkWindow *window);
void gdk_window_unfullscreen (GdkWindow *window);
void gdk_window_set_keep_above (GdkWindow *window,
gboolean setting);
gdouble opacity);
void gdk_window_register_dnd (GdkWindow *window);
-void gdk_window_begin_resize_drag (GdkWindow *window,
- GdkWindowEdge edge,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
-void gdk_window_begin_move_drag (GdkWindow *window,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
+GdkDragProtocol
+ gdk_window_get_drag_protocol(GdkWindow *window,
+ GdkWindow **target);
+
+void gdk_window_begin_resize_drag (GdkWindow *window,
+ GdkWindowEdge edge,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+GDK_AVAILABLE_IN_3_4
+void gdk_window_begin_resize_drag_for_device (GdkWindow *window,
+ GdkWindowEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+void gdk_window_begin_move_drag (GdkWindow *window,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+GDK_AVAILABLE_IN_3_4
+void gdk_window_begin_move_drag_for_device (GdkWindow *window,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
/* Interface for dirty-region queueing */
void gdk_window_invalidate_rect (GdkWindow *window,
gint *new_width,
gint *new_height);
+GDK_DEPRECATED_IN_3_8
void gdk_window_enable_synchronized_configure (GdkWindow *window);
+GDK_DEPRECATED_IN_3_8
void gdk_window_configure_finished (GdkWindow *window);
-#if !defined (GDK_MULTIHEAD_SAFE) && !defined (GDK_MULTIDEVICE_SAFE)
-GdkPointerHooks *gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
-#endif /* !GDK_MULTIHEAD_SAFE && !GDK_MULTIDEVICE_SAFE */
-
GdkWindow *gdk_get_default_root_window (void);
/* Offscreen redirection */
gboolean support_multidevice);
gboolean gdk_window_get_support_multidevice (GdkWindow *window);
+/* Frame clock */
+GDK_AVAILABLE_IN_3_8
+GdkFrameClock* gdk_window_get_frame_clock (GdkWindow *window);
+
G_END_DECLS
#endif /* __GDK_WINDOW_H__ */