Free Electron
WindowI.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __window_WindowI_h__
8 #define __window_WindowI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 #ifndef FE_EVENT_LAYOUT
16 #define FE_EVENT_LAYOUT "WindowEvent"
17 #endif
18 
19 /**************************************************************************//**
20  @brief General interface to a window
21 
22  @ingroup window
23 *//***************************************************************************/
24 class FE_DL_EXPORT WindowI:
25  virtual public Component,
26  public CastableAs<WindowI>
27 {
28  public:
29 virtual Result open(const String title) =0;
30 virtual Result close(void) =0;
31 
32 virtual const Box2i& geometry(void) =0;
33 virtual void setPosition(I32 x,I32 y) =0;
34 virtual void setSize(U32 x,U32 y) =0;
35 virtual void setTitle(const String &title) =0;
36 
37 virtual void makeCurrent(void) =0;
38 virtual void releaseCurrent(void) =0;
39 virtual void setBackground(const Color& color) =0;
40 virtual const Color& background(void) const =0;
41 virtual void clear(void) =0;
42 virtual void swapBuffers(void) =0;
43 
44 virtual sp<Component> getEventContextI(void) =0;
45 };
46 
47 } /* namespace ext */
48 } /* namespace fe */
49 
50 #endif /* __window_WindowI_h__ */
kernel
Definition: namespace.dox:3
Special vector for color (RGBA)
Definition: Color.h:21
General interface to a window.
Definition: WindowI.h:24
Automatically reference-counted string container.
Definition: String.h:128
Result
Generalized return value indicating success or failure, and why.
Definition: Result.h:24
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192