-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6003ec
commit 2ad1cf7
Showing
18 changed files
with
747 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
Louvre (2.8.0-1) | ||
|
||
# New Protocols | ||
|
||
* Image Capture Source. | ||
|
||
# API Changes | ||
|
||
* LActivationToken: The destructor has been made private, and move/copy constructors have been deleted to prevent API misuse. | ||
|
||
# Building | ||
|
||
* Removed an unnecessary flag in meson.build that was generating excessive warnings when using clang. | ||
|
||
-- Eduardo Hopperdietzel <[email protected]> Sat, 23 Aug 2024 22:15:24 -0400 | ||
|
||
|
||
Louvre (2.7.0-1) | ||
|
||
# New Protocols | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
2.7.0 | ||
2.8.0 |
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
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
68 changes: 68 additions & 0 deletions
68
src/lib/protocols/ImageCaptureSource/GForeignToplevelImageCaptureSourceManager.cpp
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,68 @@ | ||
#include <protocols/ImageCaptureSource/GForeignToplevelImageCaptureSourceManager.h> | ||
#include <protocols/ImageCaptureSource/ext-image-capture-source-v1.h> | ||
#include <protocols/ImageCaptureSource/RImageCaptureSource.h> | ||
#include <private/LClientPrivate.h> | ||
#include <LUtils.h> | ||
|
||
using namespace Louvre::Protocols::ImageCaptureSource; | ||
using namespace Louvre; | ||
|
||
static const struct ext_foreign_toplevel_image_capture_source_manager_v1_interface imp | ||
{ | ||
.create_source = &GForeignToplevelImageCaptureSourceManager::create_source, | ||
.destroy = &GForeignToplevelImageCaptureSourceManager::destroy | ||
}; | ||
|
||
void GForeignToplevelImageCaptureSourceManager::bind(wl_client *client, void */*data*/, UInt32 version, UInt32 id) noexcept | ||
{ | ||
new GForeignToplevelImageCaptureSourceManager(client, version, id); | ||
} | ||
|
||
Int32 GForeignToplevelImageCaptureSourceManager::maxVersion() noexcept | ||
{ | ||
return LOUVRE_FOREIGN_TOPLEVEL_IMAGE_CAPTURE_SOURCE_MANAGER; | ||
} | ||
|
||
const wl_interface *GForeignToplevelImageCaptureSourceManager::interface() noexcept | ||
{ | ||
return &ext_foreign_toplevel_image_capture_source_manager_v1_interface; | ||
} | ||
|
||
GForeignToplevelImageCaptureSourceManager::GForeignToplevelImageCaptureSourceManager( | ||
wl_client *client, | ||
Int32 version, | ||
UInt32 id | ||
) noexcept | ||
:LResource | ||
( | ||
client, | ||
interface(), | ||
version, | ||
id, | ||
&imp | ||
) | ||
{ | ||
this->client()->imp()->foreignToplevelImageCaptureSourceManagerGlobals.emplace_back(this); | ||
} | ||
|
||
GForeignToplevelImageCaptureSourceManager::~GForeignToplevelImageCaptureSourceManager() noexcept | ||
{ | ||
LVectorRemoveOneUnordered(client()->imp()->foreignToplevelImageCaptureSourceManagerGlobals, this); | ||
} | ||
|
||
/******************** REQUESTS ********************/ | ||
|
||
void GForeignToplevelImageCaptureSourceManager::destroy(wl_client */*client*/, wl_resource *resource) noexcept | ||
{ | ||
wl_resource_destroy(resource); | ||
} | ||
|
||
void GForeignToplevelImageCaptureSourceManager::create_source(wl_client */*client*/, wl_resource *resource, UInt32 id, wl_resource *toplevel_handle) noexcept | ||
{ | ||
new RImageCaptureSource( | ||
static_cast<GForeignToplevelImageCaptureSourceManager*>(wl_resource_get_user_data(resource))->client(), | ||
wl_resource_get_version(resource), | ||
id, | ||
LImageCaptureSourceType::ForeignToplevel, | ||
static_cast<LResource*>(wl_resource_get_user_data(toplevel_handle))); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/lib/protocols/ImageCaptureSource/GForeignToplevelImageCaptureSourceManager.h
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,18 @@ | ||
#ifndef GFOREIGNTOPLEVELIMAGECAPTURESOURCEMANAGER_H | ||
#define GFOREIGNTOPLEVELIMAGECAPTURESOURCEMANAGER_H | ||
|
||
#include <LResource.h> | ||
|
||
class Louvre::Protocols::ImageCaptureSource::GForeignToplevelImageCaptureSourceManager final : public LResource | ||
{ | ||
public: | ||
static void destroy(wl_client *client, wl_resource *resource) noexcept; | ||
static void create_source(wl_client *client, wl_resource *resource, UInt32 id, wl_resource *toplevel_handle) noexcept; | ||
private: | ||
LGLOBAL_INTERFACE | ||
GForeignToplevelImageCaptureSourceManager(wl_client *client, Int32 version, UInt32 id) noexcept; | ||
~GForeignToplevelImageCaptureSourceManager() noexcept; | ||
}; | ||
|
||
|
||
#endif // GFOREIGNTOPLEVELIMAGECAPTURESOURCEMANAGER_H |
68 changes: 68 additions & 0 deletions
68
src/lib/protocols/ImageCaptureSource/GOutputImageCaptureSourceManager.cpp
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,68 @@ | ||
#include <protocols/ImageCaptureSource/GOutputImageCaptureSourceManager.h> | ||
#include <protocols/ImageCaptureSource/ext-image-capture-source-v1.h> | ||
#include <protocols/ImageCaptureSource/RImageCaptureSource.h> | ||
#include <private/LClientPrivate.h> | ||
#include <LUtils.h> | ||
|
||
using namespace Louvre::Protocols::ImageCaptureSource; | ||
using namespace Louvre; | ||
|
||
static const struct ext_output_image_capture_source_manager_v1_interface imp | ||
{ | ||
.create_source = &GOutputImageCaptureSourceManager::create_source, | ||
.destroy = &GOutputImageCaptureSourceManager::destroy | ||
}; | ||
|
||
void GOutputImageCaptureSourceManager::bind(wl_client *client, void */*data*/, UInt32 version, UInt32 id) noexcept | ||
{ | ||
new GOutputImageCaptureSourceManager(client, version, id); | ||
} | ||
|
||
Int32 GOutputImageCaptureSourceManager::maxVersion() noexcept | ||
{ | ||
return LOUVRE_OUTPUT_IMAGE_CAPTURE_SOURCE_MANAGER; | ||
} | ||
|
||
const wl_interface *GOutputImageCaptureSourceManager::interface() noexcept | ||
{ | ||
return &ext_output_image_capture_source_manager_v1_interface; | ||
} | ||
|
||
GOutputImageCaptureSourceManager::GOutputImageCaptureSourceManager( | ||
wl_client *client, | ||
Int32 version, | ||
UInt32 id | ||
) noexcept | ||
:LResource | ||
( | ||
client, | ||
interface(), | ||
version, | ||
id, | ||
&imp | ||
) | ||
{ | ||
this->client()->imp()->outputImageCaptureSourceManagerGlobals.emplace_back(this); | ||
} | ||
|
||
GOutputImageCaptureSourceManager::~GOutputImageCaptureSourceManager() noexcept | ||
{ | ||
LVectorRemoveOneUnordered(client()->imp()->outputImageCaptureSourceManagerGlobals, this); | ||
} | ||
|
||
/******************** REQUESTS ********************/ | ||
|
||
void GOutputImageCaptureSourceManager::destroy(wl_client */*client*/, wl_resource *resource) noexcept | ||
{ | ||
wl_resource_destroy(resource); | ||
} | ||
|
||
void GOutputImageCaptureSourceManager::create_source(wl_client */*client*/, wl_resource *resource, UInt32 id, wl_resource *output) noexcept | ||
{ | ||
new RImageCaptureSource( | ||
static_cast<GOutputImageCaptureSourceManager*>(wl_resource_get_user_data(resource))->client(), | ||
wl_resource_get_version(resource), | ||
id, | ||
LImageCaptureSourceType::Output, | ||
static_cast<LResource*>(wl_resource_get_user_data(output))); | ||
} |
17 changes: 17 additions & 0 deletions
17
src/lib/protocols/ImageCaptureSource/GOutputImageCaptureSourceManager.h
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,17 @@ | ||
#ifndef GOUTPUTIMAGECAPTURESOURCEMANAGER_H | ||
#define GOUTPUTIMAGECAPTURESOURCEMANAGER_H | ||
|
||
#include <LResource.h> | ||
|
||
class Louvre::Protocols::ImageCaptureSource::GOutputImageCaptureSourceManager final : public LResource | ||
{ | ||
public: | ||
static void destroy(wl_client *client, wl_resource *resource) noexcept; | ||
static void create_source(wl_client *client, wl_resource *resource, UInt32 id, wl_resource *output) noexcept; | ||
private: | ||
LGLOBAL_INTERFACE | ||
GOutputImageCaptureSourceManager(wl_client *client, Int32 version, UInt32 id) noexcept; | ||
~GOutputImageCaptureSourceManager() noexcept; | ||
}; | ||
|
||
#endif // GOUTPUTIMAGECAPTURESOURCEMANAGER_H |
35 changes: 35 additions & 0 deletions
35
src/lib/protocols/ImageCaptureSource/RImageCaptureSource.cpp
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,35 @@ | ||
#include <protocols/ImageCaptureSource/ext-image-capture-source-v1.h> | ||
#include <protocols/ImageCaptureSource/RImageCaptureSource.h> | ||
|
||
using namespace Louvre::Protocols::ImageCaptureSource; | ||
|
||
static const struct ext_image_capture_source_v1_interface imp | ||
{ | ||
.destroy = &RImageCaptureSource::destroy, | ||
}; | ||
|
||
RImageCaptureSource::RImageCaptureSource | ||
(LClient *client, | ||
Int32 version, | ||
UInt32 id, | ||
LImageCaptureSourceType type, | ||
LResource *source | ||
) noexcept | ||
:LResource | ||
( | ||
client, | ||
&ext_image_capture_source_v1_interface, | ||
version, | ||
id, | ||
&imp | ||
), | ||
m_source(source), | ||
m_type(type) | ||
{} | ||
|
||
/******************** REQUESTS ********************/ | ||
|
||
void RImageCaptureSource::destroy(wl_client */*client*/, wl_resource *resource) noexcept | ||
{ | ||
wl_resource_destroy(resource); | ||
} |
36 changes: 36 additions & 0 deletions
36
src/lib/protocols/ImageCaptureSource/RImageCaptureSource.h
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,36 @@ | ||
#ifndef RIMAGECAPTURESOURCE_H | ||
#define RIMAGECAPTURESOURCE_H | ||
|
||
#include <LResource.h> | ||
#include <LWeak.h> | ||
|
||
class Louvre::Protocols::ImageCaptureSource::RImageCaptureSource final : public LResource | ||
{ | ||
public: | ||
|
||
LImageCaptureSourceType type() const noexcept | ||
{ | ||
return m_type; | ||
} | ||
|
||
LResource *source() const noexcept | ||
{ | ||
return m_source.get(); | ||
} | ||
|
||
/******************** REQUESTS ********************/ | ||
|
||
static void destroy(wl_client *client, wl_resource *resource) noexcept; | ||
|
||
private: | ||
friend class Louvre::Protocols::ImageCaptureSource::GOutputImageCaptureSourceManager; | ||
friend class Louvre::Protocols::ImageCaptureSource::GForeignToplevelImageCaptureSourceManager; | ||
|
||
RImageCaptureSource(LClient *client, Int32 version, UInt32 id, LImageCaptureSourceType type, LResource *source) noexcept; | ||
~RImageCaptureSource() = default; | ||
|
||
LWeak<LResource> m_source; // Wayland::GOutput or ForeignToplevelList::RForeignToplevelHandle | ||
LImageCaptureSourceType m_type; | ||
}; | ||
|
||
#endif // RIMAGECAPTURESOURCE_H |
Oops, something went wrong.