• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
14 typedef Window XWindow;
15 
16 namespace sk_app {
17 
18 class WindowContext;
19 struct DisplayParams;
20 
21 namespace window_context_factory {
22 
23 struct XlibWindowInfo {
24     Display*     fDisplay;
25     XWindow      fWindow;
26     GLXFBConfig* fFBConfig;
27     XVisualInfo* fVisualInfo;
28     int          fWidth;
29     int          fHeight;
30 };
31 
32 WindowContext* NewVulkanForXlib(const XlibWindowInfo&, const DisplayParams&);
33 
34 WindowContext* NewGLForXlib(const XlibWindowInfo&, const DisplayParams&);
35 
36 WindowContext* NewRasterForXlib(const XlibWindowInfo&, const DisplayParams&);
37 
38 }  // namespace window_context_factory
39 
40 }  // namespace sk_app
41 
42 #endif
43