mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Adds a support for compiling flutter engine when gdk does not have X11 backend. In such a configuration the generated gdkconfig.h header file looks like the following: /* gdkconfig.h * * This is a generated file. Please modify `configure.ac' */ #ifndef __GDKCONFIG_H__ #define __GDKCONFIG_H__ #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) #error "Only <gdk/gdk.h> can be included directly." #endif #include <glib.h> G_BEGIN_DECLS #define GDK_WINDOWING_WAYLAND G_END_DECLS #endif /* __GDKCONFIG_H__ */ Additionally headers like <gdk/gdkx.h> are not available at all. Above configuration can be found on the most of the embedded systems. This patch enables compilation of X11 specific code only when gdk defines GDK_WINDOWING_X11. Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
44 lines
982 B
C
44 lines
982 B
C
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERER_X11_H_
|
|
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERER_X11_H_
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#ifdef GDK_WINDOWING_X11
|
|
#include <gdk/gdkx.h>
|
|
|
|
#include "flutter/shell/platform/linux/fl_renderer.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
G_DECLARE_FINAL_TYPE(FlRendererX11,
|
|
fl_renderer_x11,
|
|
FL,
|
|
RENDERER_X11,
|
|
FlRenderer)
|
|
|
|
/**
|
|
* FlRendererX11:
|
|
*
|
|
* #FlRendererX11 is an implementation of #FlRenderer that renders to X11
|
|
* windows.
|
|
*/
|
|
|
|
/**
|
|
* fl_renderer_x11_new:
|
|
*
|
|
* Creates an object that allows Flutter to render to X11 windows.
|
|
*
|
|
* Returns: a new #FlRendererX11.
|
|
*/
|
|
FlRendererX11* fl_renderer_x11_new();
|
|
|
|
G_END_DECLS
|
|
|
|
#endif // GDK_WINDOWING_X11
|
|
|
|
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERER_X11_H_
|