1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_CACA_CACA_CONNECTION_H_
6 #define UI_OZONE_PLATFORM_CACA_CACA_CONNECTION_H_
10 #include "base/macros.h"
11 #include "ui/gfx/geometry/size.h"
15 // Basic initialization of Libcaca. This needs to be shared between SFO and EFO
16 // since both need the |display_| to draw and process events respectively.
17 // Note, |canvas_| needs to be here since it is needed for creating a
19 class CacaConnection {
26 // This is the Caca canvas size.
27 gfx::Size physical_size() const { return physical_size_; }
28 gfx::Size bitmap_size() const { return bitmap_size_; }
29 caca_display_t* display() const { return display_; }
32 caca_canvas_t* canvas_;
33 caca_display_t* display_;
35 // Size of the console in characters. This can be changed by setting
36 // CACA_GEOMETRY environment variable.
37 gfx::Size physical_size_;
39 // Size of the backing buffer we draw into. Size in pixels.
40 gfx::Size bitmap_size_;
42 DISALLOW_COPY_AND_ASSIGN(CacaConnection);
47 #endif // UI_OZONE_PLATFORM_CACA_CACA_CONNECTION_H_