1
2/*
3 * Copyright 2016 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#ifndef WindowContextFactory_unix_DEFINED
10#define WindowContextFactory_unix_DEFINED
11
12#include <X11/Xlib.h>
13#include <GL/glx.h>
14typedef Window XWindow;
15
16namespace sk_app {
17
18class WindowContext;
19struct DisplayParams;
20
21namespace window_context_factory {
22
23struct XlibWindowInfo {
24    Display*     fDisplay;
25    XWindow      fWindow;
26    GLXFBConfig* fFBConfig;
27    XVisualInfo* fVisualInfo;
28    int          fWidth;
29    int          fHeight;
30};
31
32WindowContext* NewVulkanForXlib(const XlibWindowInfo&, const DisplayParams&);
33
34WindowContext* NewGLForXlib(const XlibWindowInfo&, const DisplayParams&);
35
36WindowContext* NewRasterForXlib(const XlibWindowInfo&, const DisplayParams&);
37
38}  // namespace window_context_factory
39
40}  // namespace sk_app
41
42#endif
43