Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5371e7c
Enabling windowless support based on USE_WPE_BACKEND_WINDOWLESS flag
Apr 13, 2016
f6eb9bc
Including RenderingBackend header file
Apr 13, 2016
ec03d16
ViewBackendWindowless source implementation
Apr 13, 2016
7d7568b
ViewBackendWindowless headers declaration
Apr 13, 2016
6377b5d
Added windowless backend code
Apr 13, 2016
9898784
Added windowless backend support to WPE
Apr 13, 2016
4bf1e3c
Added PlatformDisplayWayland code
Apr 13, 2016
41b30d1
Added PlatformDisplayWayland code under WAYLAND flag
Apr 13, 2016
2a5b991
Using GSTREAMER_GL flag for GL
Apr 13, 2016
7064060
Using GSTREAMER_GL flag for GL
Apr 13, 2016
24ca9ae
Keyboard and Mouse events support added
Apr 13, 2016
a90a313
Keyboard and Mouse support code
Apr 13, 2016
2c9b082
Added WaylandSurface releaseBuffer definition
Apr 13, 2016
95136b1
Added releaseBuffer prototype
Apr 13, 2016
b66a134
Keyboard and Mouse support added
Apr 13, 2016
5f8bca1
Keyboard and Mouse support added
Apr 13, 2016
e6f77eb
Keyboad support added
Apr 13, 2016
872caa8
Changes for supporting keyboard
Apr 13, 2016
7d43d3c
Added keyboard and mouse support code
Apr 13, 2016
9119e83
Keyboard and Mouse event APIs added
Apr 13, 2016
89e3890
Adding CompositingManager buffer APIs
Apr 13, 2016
cacc70a
Updating CompostingManager buffer methods
Apr 13, 2016
fe950aa
Adding USE_WPE_BACKEND_WINDOWLESS option
Apr 13, 2016
b35eae9
Enabling mouse cursor and pointer
Apr 13, 2016
f3d32e0
Updating CMakeLists.txt for adding STM Backend support
May 23, 2016
c0c395d
Adding input event handling headers
May 23, 2016
491012f
Input event handling support
May 23, 2016
15eeab3
Input handling support on ViewBackend
May 23, 2016
04c3681
Adding STM backend support on RenderingBackend
May 23, 2016
080faa2
New RenderingBackend with input handling
May 23, 2016
486fedd
New RenderingBackend with input handling
May 23, 2016
c454079
Removing Windowless backend changes
May 23, 2016
d23b11d
Removing Windowless backend changes
May 23, 2016
8f1c4ee
New ViewBackend with frame completion handling
May 23, 2016
911bb5a
New ViewBackend with frame completion handling
May 23, 2016
5ff9688
Adding STM backend support on ViewBackend
May 23, 2016
622b7f1
Adding support for STM Backend
May 23, 2016
916e444
Removing Windowless backend changes
May 23, 2016
96157ab
Removing Windowless backend changes
May 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Source/WPE/CMakeLists.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,10 @@ if (USE_WPE_BACKEND_INTEL_CE)
add_definitions(-DWPE_BACKEND_INTEL_CE=1)
endif ()

if (USE_WPE_BACKEND_STM)
add_definitions(-DWPE_BACKEND_STM=1)
endif ()

if (USE_WPE_BACKEND_WESTEROS)
find_package(westeros REQUIRED)
add_definitions(-DWPE_BACKEND_WESTEROS=1)
Expand DownExpand Up@@ -71,6 +75,7 @@ set(WPE_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Graphics/GBM"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Graphics/IntelCE"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Graphics/Westeros"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Graphics/STM"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Input"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Pasteboard"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Pasteboard"
Expand All@@ -84,6 +89,7 @@ set(WPE_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/ViewBackend/Wayland"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/ViewBackend/Wayland/Protocols"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/ViewBackend/Westeros"
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/ViewBackend/STM"
${BCM_HOST_INCLUDE_DIRS}
${GDL_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
Expand DownExpand Up@@ -131,6 +137,7 @@ if (USE_WPE_BACKEND_BCM_NEXUS)

Source/ViewBackend/BCMNexus/ViewBackendBCMNexus.cpp
)
list(APPEND WPE_LIBRARIES nxclient)
endif ()

if (USE_WPE_BACKEND_BCM_RPI)
Expand All@@ -140,6 +147,7 @@ if (USE_WPE_BACKEND_BCM_RPI)

Source/ViewBackend/BCMRPi/ViewBackendBCMRPi.cpp
)
list(APPEND WPE_LIBRARIES nxclient)
endif ()

if (USE_WPE_BACKEND_INTEL_CE)
Expand DownExpand Up@@ -176,6 +184,22 @@ if (USE_WPE_BACKEND_WESTEROS)
)
endif ()

if (USE_WPE_BACKEND_STM)
list(APPEND WPE_INCLUDE_DIRECTORIES
${STM_INCLUDE_DIRS}
${STMEGL_INCLUDE_DIRS}
)
list(APPEND WPE_LIBRARIES
${STM_LIBRARIES}
${STMEGL_LIBRARIES}
)
list(APPEND WPE_SOURCES
Source/Graphics/STM/RenderingBackendSTM.cpp
Source/Graphics/RenderingBackend.cpp
Source/ViewBackend/STM/ViewBackendSTM.cpp
)
endif ()

if (USE_WPE_BUFFER_MANAGEMENT_GBM)
list(APPEND WPE_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source/WPE/Source/Graphics/GBM"
Expand Down
10 changes: 10 additions & 0 deletions Source/WPE/Headers/WPE/Graphics/RenderingBackend.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,12 @@

namespace WPE {

namespace Input {
struct KeyboardEvent;
struct PointerEvent;
struct AxisEvent;
}

namespace Graphics {

class RenderingBackend {
Expand All@@ -46,6 +52,10 @@ class RenderingBackend {
class Client {
public:
virtual void destroyBuffer(uint32_t) = 0;
/* FIXME Input handling
virtual void handleKeyboardEvent(Input::KeyboardEvent& event) = 0;
virtual void handlePointerEvent(Input::PointerEvent& event) = 0;
virtual void handleAxisEvent(Input::AxisEvent& event) = 0;*/
};

virtual ~Surface();
Expand Down
47 changes: 45 additions & 2 deletions Source/WPE/Headers/WPE/Input/Events.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,11 @@

#include <array>

namespace IPC {
class ArgumentDecoder;
class ArgumentEncoder;
}

namespace WPE {

namespace Input {
Expand All@@ -52,6 +57,19 @@ struct KeyboardEvent {
uint32_t unicode;
bool pressed;
uint8_t modifiers;

KeyboardEvent(){}
KeyboardEvent(uint32_t in_time, uint32_t in_keyCode, uint32_t in_unicode, bool in_pressed, uint8_t in_modifiers)
: time(in_time)
, keyCode(in_keyCode)
, unicode(in_unicode)
, pressed(in_pressed)
, modifiers(in_modifiers)
{
}

void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, KeyboardEvent&);
};

struct PointerEvent {
Expand All@@ -70,12 +88,25 @@ struct PointerEvent {
uint32_t state;
};

Type type;
uint32_t type;
uint32_t time;
int x;
int y;
uint32_t button;
uint32_t state;
PointerEvent() {}
PointerEvent(uint32_t in_type, uint32_t in_time, int in_x, int in_y, uint32_t in_button, uint32_t in_state)
: type(in_type)
, time(in_time)
, x(in_x)
, y(in_y)
, button(in_button)
, state(in_state)
{
}

void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, PointerEvent&);
};

struct AxisEvent {
Expand All@@ -91,12 +122,24 @@ struct AxisEvent {
int32_t value;
};

Type type;
uint32_t type;
uint32_t time;
int x;
int y;
uint32_t axis;
int32_t value;
AxisEvent() {}
AxisEvent(uint32_t in_type, uint32_t in_time, int in_x, int in_y, uint32_t in_axis, int32_t in_value)
: type(in_type)
, time(in_time)
, x(in_x)
, y(in_y)
, axis(in_axis)
, value(in_value)
{
}
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, AxisEvent&);
};

struct TouchEvent {
Expand Down
7 changes: 7 additions & 0 deletions Source/WPE/Headers/WPE/ViewBackend/ViewBackend.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,9 @@ namespace WPE {

namespace Input {
class Client;
struct KeyboardEvent;
struct PointerEvent;
struct AxisEvent;
}

namespace ViewBackend {
Expand All@@ -57,6 +60,10 @@ class ViewBackend {
virtual void commitBuffer(int, const uint8_t*, size_t) = 0;
virtual void destroyBuffer(uint32_t) = 0;

virtual void handleKeyboardEvent(const Input::KeyboardEvent& event);
virtual void handlePointerEvent(const Input::PointerEvent& event);
virtual void handleAxisEvent(const Input::AxisEvent& event);

virtual void setInputClient(Input::Client*);
};

Expand Down
9 changes: 9 additions & 0 deletions Source/WPE/Source/Graphics/RenderingBackend.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,7 @@
#include "RenderingBackendBCMNexus.h"
#include "RenderingBackendBCMRPi.h"
#include "RenderingBackendIntelCE.h"
#include "RenderingBackendSTM.h"
#include <cstdio>

#if WPE_BUFFER_MANAGEMENT(GBM)
Expand All@@ -47,6 +48,10 @@
#include "RenderingBackendWesteros.h"
#endif

#if WPE_BACKEND(STM)
#include "RenderingBackendSTM.h"
#endif

namespace WPE {

namespace Graphics {
Expand DownExpand Up@@ -84,6 +89,10 @@ std::unique_ptr<RenderingBackend> RenderingBackend::create(const uint8_t* data,
return std::unique_ptr<RenderingBackendWesteros>(new RenderingBackendWesteros);
#endif

#if WPE_BACKEND(STM)
return std::unique_ptr<RenderingBackendSTM>(new RenderingBackendSTM);
#endif

fprintf(stderr, "RenderingBackend: no usable backend found, will crash.\n");
return nullptr;
}
Expand Down
Loading