2014-01-23 16:33:53 -05:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
|
|
|
* Copyright (C) 2002 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2003, 2004 Rob Adams
|
|
|
|
* Copyright (C) 2004-2006 Elijah Newren
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_WINDOW_X11_H
|
|
|
|
#define META_WINDOW_X11_H
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
2019-08-20 15:38:35 -04:00
|
|
|
#include "core/window-private.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "meta/compositor.h"
|
|
|
|
#include "meta/window.h"
|
2022-09-07 08:26:54 -04:00
|
|
|
#include "x11/meta-sync-counter.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
|
2014-03-18 11:20:22 -04:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2019-08-20 15:38:35 -04:00
|
|
|
#define META_TYPE_WINDOW_X11 (meta_window_x11_get_type())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (MetaWindowX11, meta_window_x11,
|
|
|
|
META, WINDOW_X11, MetaWindow)
|
2014-03-18 11:20:22 -04:00
|
|
|
|
2019-08-20 15:38:35 -04:00
|
|
|
struct _MetaWindowX11Class
|
|
|
|
{
|
|
|
|
MetaWindowClass parent_class;
|
2014-03-18 11:20:22 -04:00
|
|
|
|
2019-08-20 15:38:35 -04:00
|
|
|
void (*freeze_commits) (MetaWindow *window);
|
|
|
|
void (*thaw_commits) (MetaWindow *window);
|
|
|
|
gboolean (*always_update_shape) (MetaWindow *window);
|
|
|
|
};
|
2017-08-30 03:17:41 -04:00
|
|
|
|
2014-05-20 09:18:45 -04:00
|
|
|
MetaWindow * meta_window_x11_new (MetaDisplay *display,
|
|
|
|
Window xwindow,
|
|
|
|
gboolean must_be_viewable,
|
|
|
|
MetaCompEffect effect);
|
|
|
|
|
2014-02-01 19:19:22 -05:00
|
|
|
void meta_window_x11_set_net_wm_state (MetaWindow *window);
|
|
|
|
void meta_window_x11_set_wm_state (MetaWindow *window);
|
2019-01-30 14:19:41 -05:00
|
|
|
void meta_window_x11_set_wm_take_focus (MetaWindow *window,
|
|
|
|
gboolean take_focus);
|
2019-01-30 14:41:11 -05:00
|
|
|
void meta_window_x11_set_wm_ping (MetaWindow *window,
|
|
|
|
gboolean ping);
|
2019-01-30 14:40:17 -05:00
|
|
|
void meta_window_x11_set_wm_delete_window (MetaWindow *window,
|
|
|
|
gboolean delete_window);
|
2014-04-29 15:18:40 -04:00
|
|
|
void meta_window_x11_set_allowed_actions_hint (MetaWindow *window);
|
2014-01-23 16:33:53 -05:00
|
|
|
|
2014-04-29 16:59:54 -04:00
|
|
|
void meta_window_x11_create_sync_request_alarm (MetaWindow *window);
|
|
|
|
void meta_window_x11_destroy_sync_request_alarm (MetaWindow *window);
|
|
|
|
|
2014-02-01 19:19:22 -05:00
|
|
|
void meta_window_x11_update_input_region (MetaWindow *window);
|
|
|
|
void meta_window_x11_update_shape_region (MetaWindow *window);
|
2014-01-23 16:33:53 -05:00
|
|
|
|
2014-03-13 16:49:17 -04:00
|
|
|
void meta_window_x11_recalc_window_type (MetaWindow *window);
|
|
|
|
|
2014-01-23 16:33:53 -05:00
|
|
|
gboolean meta_window_x11_configure_request (MetaWindow *window,
|
|
|
|
XEvent *event);
|
|
|
|
gboolean meta_window_x11_property_notify (MetaWindow *window,
|
|
|
|
XEvent *event);
|
|
|
|
gboolean meta_window_x11_client_message (MetaWindow *window,
|
|
|
|
XEvent *event);
|
|
|
|
|
2014-03-18 10:36:00 -04:00
|
|
|
void meta_window_x11_configure_notify (MetaWindow *window,
|
|
|
|
XConfigureEvent *event);
|
|
|
|
|
2014-06-16 18:25:40 -04:00
|
|
|
Window meta_window_x11_get_toplevel_xwindow (MetaWindow *window);
|
|
|
|
|
2019-11-19 08:08:45 -05:00
|
|
|
void meta_window_x11_freeze_commits (MetaWindow *window);
|
|
|
|
void meta_window_x11_thaw_commits (MetaWindow *window);
|
|
|
|
|
2019-12-06 07:04:12 -05:00
|
|
|
void meta_window_x11_set_thaw_after_paint (MetaWindow *window,
|
|
|
|
gboolean thaw_after_paint);
|
|
|
|
gboolean meta_window_x11_should_thaw_after_paint (MetaWindow *window);
|
2019-12-06 10:01:35 -05:00
|
|
|
gboolean meta_window_x11_always_update_shape (MetaWindow *window);
|
2019-12-06 07:04:12 -05:00
|
|
|
|
2020-03-10 09:44:15 -04:00
|
|
|
void meta_window_x11_surface_rect_to_frame_rect (MetaWindow *window,
|
|
|
|
MetaRectangle *surface_rect,
|
2020-01-17 11:56:12 -05:00
|
|
|
MetaRectangle *frame_rect);
|
2020-02-26 05:03:48 -05:00
|
|
|
void meta_window_x11_surface_rect_to_client_rect (MetaWindow *window,
|
|
|
|
MetaRectangle *surface_rect,
|
|
|
|
MetaRectangle *client_rect);
|
2019-08-20 15:38:35 -04:00
|
|
|
|
|
|
|
MetaRectangle meta_window_x11_get_client_rect (MetaWindowX11 *window_x11);
|
|
|
|
|
2019-08-20 15:46:50 -04:00
|
|
|
gboolean meta_window_x11_can_unredirect (MetaWindowX11 *window_x11);
|
|
|
|
|
2022-09-07 08:26:54 -04:00
|
|
|
MetaSyncCounter * meta_window_x11_get_sync_counter (MetaWindow *window);
|
|
|
|
|
|
|
|
gboolean meta_window_x11_has_active_sync_alarms (MetaWindow *window);
|
|
|
|
|
|
|
|
gboolean meta_window_x11_is_awaiting_sync_response (MetaWindow *window);
|
|
|
|
|
2014-01-23 16:33:53 -05:00
|
|
|
#endif
|