Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map more keys, fix mouse wheel, add stub subsurface support, cleanup
- Loading branch information
Showing
7 changed files
with
110 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include "HaikuSubcompositor.h" | ||
|
||
extern const struct wl_interface wl_subcompositor_interface; | ||
|
||
|
||
#define SUBCOMPOSITOR_VERSION 1 | ||
|
||
|
||
//#pragma mark - HaikuSubcompositor | ||
|
||
struct wl_global *HaikuSubcompositor::CreateGlobal(struct wl_display *display) | ||
{ | ||
return wl_global_create(display, &wl_subcompositor_interface, SUBCOMPOSITOR_VERSION, NULL, HaikuSubcompositor::Bind); | ||
} | ||
|
||
void HaikuSubcompositor::Bind(struct wl_client *wl_client, void *data, uint32_t version, uint32_t id) | ||
{ | ||
HaikuSubcompositor *manager = new(std::nothrow) HaikuSubcompositor(); | ||
if (manager == NULL) { | ||
wl_client_post_no_memory(wl_client); | ||
return; | ||
} | ||
if (!manager->Init(wl_client, version, id)) { | ||
return; | ||
} | ||
} | ||
|
||
void HaikuSubcompositor::HandleGetSubsurface(uint32_t id, struct wl_resource *surface, struct wl_resource *parent) | ||
{ | ||
HaikuSubsurface *subsurface = HaikuSubsurface::Create(Client(), wl_resource_get_version(ToResource()), id); | ||
} | ||
|
||
|
||
//#pragma mark - HaikuSubsurface | ||
|
||
HaikuSubsurface *HaikuSubsurface::Create(struct wl_client *client, uint32_t version, uint32_t id) | ||
{ | ||
HaikuSubsurface *surface = new(std::nothrow) HaikuSubsurface(); | ||
if (!surface->Init(client, version, id)) { | ||
return NULL; | ||
} | ||
return surface; | ||
} | ||
|
||
void HaikuSubsurface::HandleSetPosition(int32_t x, int32_t y) | ||
{ | ||
} | ||
|
||
void HaikuSubsurface::HandlePlaceAbove(struct wl_resource *sibling) | ||
{ | ||
} | ||
|
||
void HaikuSubsurface::HandlePlaceBelow(struct wl_resource *sibling) | ||
{ | ||
} | ||
|
||
void HaikuSubsurface::HandleSetSync() | ||
{ | ||
} | ||
|
||
void HaikuSubsurface::HandleSetDesync() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "Wayland.h" | ||
|
||
|
||
class HaikuSubcompositor: public WlSubcompositor { | ||
public: | ||
static void Bind(struct wl_client *wl_client, void *data, uint32_t version, uint32_t id); | ||
|
||
public: | ||
static struct wl_global *CreateGlobal(struct wl_display *display); | ||
static HaikuSubcompositor *FromResource(struct wl_resource *resource) {return (HaikuSubcompositor*)WlResource::FromResource(resource);} | ||
|
||
void HandleGetSubsurface(uint32_t id, struct wl_resource *surface, struct wl_resource *parent) final; | ||
}; | ||
|
||
class HaikuSubsurface: public WlSubsurface { | ||
public: | ||
static HaikuSubsurface *Create(struct wl_client *client, uint32_t version, uint32_t id); | ||
void HandleSetPosition(int32_t x, int32_t y) final; | ||
void HandlePlaceAbove(struct wl_resource *sibling) final; | ||
void HandlePlaceBelow(struct wl_resource *sibling) final; | ||
void HandleSetSync() final; | ||
void HandleSetDesync() final; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters