xwayland: Move Xwayland output declarations
Move the Xwayland output declarations to their own header file. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
parent
091b24f13e
commit
aaeeb10b74
|
@ -22,6 +22,7 @@ Xwayland_SOURCES = \
|
||||||
xwayland-shm.h \
|
xwayland-shm.h \
|
||||||
xwayland-types.h \
|
xwayland-types.h \
|
||||||
xwayland-output.c \
|
xwayland-output.c \
|
||||||
|
xwayland-output.h \
|
||||||
xwayland-cvt.c \
|
xwayland-cvt.c \
|
||||||
xwayland-vidmode.c \
|
xwayland-vidmode.c \
|
||||||
xwayland-window.c \
|
xwayland-window.c \
|
||||||
|
|
|
@ -11,6 +11,7 @@ srcs = [
|
||||||
'xwayland-shm.h',
|
'xwayland-shm.h',
|
||||||
'xwayland-types.h',
|
'xwayland-types.h',
|
||||||
'xwayland-output.c',
|
'xwayland-output.c',
|
||||||
|
'xwayland-output.h',
|
||||||
'xwayland-cvt.c',
|
'xwayland-cvt.c',
|
||||||
'xwayland-vidmode.c',
|
'xwayland-vidmode.c',
|
||||||
'xwayland-window.c',
|
'xwayland-window.c',
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "xwayland.h"
|
#include "xwayland.h"
|
||||||
|
#include "xwayland-output.h"
|
||||||
#include "xwayland-window.h"
|
#include "xwayland-window.h"
|
||||||
|
|
||||||
#include "xdg-output-unstable-v1-client-protocol.h"
|
#include "xdg-output-unstable-v1-client-protocol.h"
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2011-2014 Intel Corporation
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, distribute, and sell this software
|
||||||
|
* and its documentation for any purpose is hereby granted without
|
||||||
|
* fee, provided that the above copyright notice appear in all copies
|
||||||
|
* and that both that copyright notice and this permission notice
|
||||||
|
* appear in supporting documentation, and that the name of the
|
||||||
|
* copyright holders not be used in advertising or publicity
|
||||||
|
* pertaining to distribution of the software without specific,
|
||||||
|
* written prior permission. The copyright holders make no
|
||||||
|
* representations about the suitability of this software for any
|
||||||
|
* purpose. It is provided "as is" without express or implied
|
||||||
|
* warranty.
|
||||||
|
*
|
||||||
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||||
|
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||||
|
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef XWAYLAND_OUTPUT_H
|
||||||
|
#define XWAYLAND_OUTPUT_H
|
||||||
|
|
||||||
|
#include <xwayland-config.h>
|
||||||
|
#include <wayland-client.h>
|
||||||
|
|
||||||
|
#include <dix.h>
|
||||||
|
#include <input.h>
|
||||||
|
#include <randrstr.h>
|
||||||
|
|
||||||
|
#include "xwayland-types.h"
|
||||||
|
|
||||||
|
struct xwl_output {
|
||||||
|
struct xorg_list link;
|
||||||
|
struct wl_output *output;
|
||||||
|
struct zxdg_output_v1 *xdg_output;
|
||||||
|
uint32_t server_output_id;
|
||||||
|
struct xwl_screen *xwl_screen;
|
||||||
|
RROutputPtr randr_output;
|
||||||
|
RRCrtcPtr randr_crtc;
|
||||||
|
int32_t x, y, width, height, refresh;
|
||||||
|
Rotation rotation;
|
||||||
|
Bool wl_output_done;
|
||||||
|
Bool xdg_output_done;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Per client per output emulated randr/vidmode resolution info. */
|
||||||
|
struct xwl_emulated_mode {
|
||||||
|
uint32_t server_output_id;
|
||||||
|
int32_t width;
|
||||||
|
int32_t height;
|
||||||
|
Bool from_vidmode;
|
||||||
|
};
|
||||||
|
|
||||||
|
Bool xwl_screen_init_output(struct xwl_screen *xwl_screen);
|
||||||
|
|
||||||
|
struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,
|
||||||
|
uint32_t id);
|
||||||
|
|
||||||
|
void xwl_output_destroy(struct xwl_output *xwl_output);
|
||||||
|
|
||||||
|
void xwl_output_remove(struct xwl_output *xwl_output);
|
||||||
|
|
||||||
|
struct xwl_emulated_mode *xwl_output_get_emulated_mode_for_client(
|
||||||
|
struct xwl_output *xwl_output, ClientPtr client);
|
||||||
|
|
||||||
|
RRModePtr xwl_output_find_mode(struct xwl_output *xwl_output,
|
||||||
|
int32_t width, int32_t height);
|
||||||
|
void xwl_output_set_emulated_mode(struct xwl_output *xwl_output,
|
||||||
|
ClientPtr client, RRModePtr mode,
|
||||||
|
Bool from_vidmode);
|
||||||
|
void xwl_output_set_window_randr_emu_props(struct xwl_screen *xwl_screen,
|
||||||
|
WindowPtr window);
|
||||||
|
|
||||||
|
void xwl_screen_init_xdg_output(struct xwl_screen *xwl_screen);
|
||||||
|
|
||||||
|
#endif /* XWAYLAND_OUTPUT_H */
|
|
@ -39,6 +39,7 @@
|
||||||
#include "xwayland.h"
|
#include "xwayland.h"
|
||||||
#include "xwayland-glamor.h"
|
#include "xwayland-glamor.h"
|
||||||
#include "xwayland-input.h"
|
#include "xwayland-input.h"
|
||||||
|
#include "xwayland-output.h"
|
||||||
#include "xwayland-pixmap.h"
|
#include "xwayland-pixmap.h"
|
||||||
#include "xwayland-present.h"
|
#include "xwayland-present.h"
|
||||||
#include "xwayland-shm.h"
|
#include "xwayland-shm.h"
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "viewporter-client-protocol.h"
|
#include "viewporter-client-protocol.h"
|
||||||
|
|
||||||
#include "xwayland-types.h"
|
#include "xwayland-types.h"
|
||||||
|
#include "xwayland-output.h"
|
||||||
#include "xwayland-glamor.h"
|
#include "xwayland-glamor.h"
|
||||||
|
|
||||||
struct xwl_format {
|
struct xwl_format {
|
||||||
|
@ -122,28 +123,6 @@ struct xwl_screen {
|
||||||
|
|
||||||
#define MODIFIER_META 0x01
|
#define MODIFIER_META 0x01
|
||||||
|
|
||||||
struct xwl_output {
|
|
||||||
struct xorg_list link;
|
|
||||||
struct wl_output *output;
|
|
||||||
struct zxdg_output_v1 *xdg_output;
|
|
||||||
uint32_t server_output_id;
|
|
||||||
struct xwl_screen *xwl_screen;
|
|
||||||
RROutputPtr randr_output;
|
|
||||||
RRCrtcPtr randr_crtc;
|
|
||||||
int32_t x, y, width, height, refresh;
|
|
||||||
Rotation rotation;
|
|
||||||
Bool wl_output_done;
|
|
||||||
Bool xdg_output_done;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Per client per output emulated randr/vidmode resolution info. */
|
|
||||||
struct xwl_emulated_mode {
|
|
||||||
uint32_t server_output_id;
|
|
||||||
int32_t width;
|
|
||||||
int32_t height;
|
|
||||||
Bool from_vidmode;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Apps which use randr/vidmode to change the mode when going fullscreen,
|
/* Apps which use randr/vidmode to change the mode when going fullscreen,
|
||||||
* usually change the mode of only a single monitor, so this should be plenty.
|
* usually change the mode of only a single monitor, so this should be plenty.
|
||||||
*/
|
*/
|
||||||
|
@ -167,31 +146,9 @@ Bool xwl_screen_has_resolution_change_emulation(struct xwl_screen *xwl_screen);
|
||||||
struct xwl_output *xwl_screen_get_first_output(struct xwl_screen *xwl_screen);
|
struct xwl_output *xwl_screen_get_first_output(struct xwl_screen *xwl_screen);
|
||||||
void xwl_screen_check_resolution_change_emulation(struct xwl_screen *xwl_screen);
|
void xwl_screen_check_resolution_change_emulation(struct xwl_screen *xwl_screen);
|
||||||
|
|
||||||
Bool xwl_screen_init_output(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,
|
|
||||||
uint32_t id);
|
|
||||||
|
|
||||||
void xwl_output_destroy(struct xwl_output *xwl_output);
|
|
||||||
|
|
||||||
void xwl_output_remove(struct xwl_output *xwl_output);
|
|
||||||
|
|
||||||
struct xwl_emulated_mode *xwl_output_get_emulated_mode_for_client(
|
|
||||||
struct xwl_output *xwl_output, ClientPtr client);
|
|
||||||
|
|
||||||
RRModePtr xwl_output_find_mode(struct xwl_output *xwl_output,
|
|
||||||
int32_t width, int32_t height);
|
|
||||||
void xwl_output_set_emulated_mode(struct xwl_output *xwl_output,
|
|
||||||
ClientPtr client, RRModePtr mode,
|
|
||||||
Bool from_vidmode);
|
|
||||||
void xwl_output_set_window_randr_emu_props(struct xwl_screen *xwl_screen,
|
|
||||||
WindowPtr window);
|
|
||||||
|
|
||||||
RRModePtr xwayland_cvt(int HDisplay, int VDisplay,
|
RRModePtr xwayland_cvt(int HDisplay, int VDisplay,
|
||||||
float VRefresh, Bool Reduced, Bool Interlaced);
|
float VRefresh, Bool Reduced, Bool Interlaced);
|
||||||
|
|
||||||
void xwl_screen_init_xdg_output(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
#ifdef XF86VIDMODE
|
#ifdef XF86VIDMODE
|
||||||
void xwlVidModeExtensionInit(void);
|
void xwlVidModeExtensionInit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue