Browse Source

Add Application::getClassName(), more wasm pugl things

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 2 years ago
parent
commit
f022c766bd
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 15 additions and 2 deletions
  1. +7
    -1
      dgl/Application.hpp
  2. +7
    -0
      dgl/src/ApplicationPrivateData.cpp
  3. +1
    -1
      dgl/src/pugl-upstream

+ 7
- 1
dgl/Application.hpp View File

@@ -109,7 +109,7 @@ public:
void removeIdleCallback(IdleCallback* callback);

/**
Set the class name of the application.
Get the class name of the application.

This is a stable identifier for the application, used as the window class/instance name on X11 and Windows.
It is not displayed to the user, but can be used in scripts and by window managers,
@@ -117,6 +117,12 @@ public:

Plugins created with DPF have their class name automatically set based on DGL_NAMESPACE and plugin name.
*/
const char* getClassName() const noexcept;

/**
Set the class name of the application.
@see getClassName
*/
void setClassName(const char* name);

private:


+ 7
- 0
dgl/src/ApplicationPrivateData.cpp View File

@@ -45,6 +45,13 @@ static bool isThisTheMainThread(const d_ThreadHandle mainThreadHandle) noexcept

// --------------------------------------------------------------------------------------------------------------------

const char* Application::getClassName() const noexcept
{
return puglGetClassName(pData->world);
}

// --------------------------------------------------------------------------------------------------------------------

Application::PrivateData::PrivateData(const bool standalone)
: world(puglNewWorld(standalone ? PUGL_PROGRAM : PUGL_MODULE,
standalone ? PUGL_WORLD_THREADS : 0x0)),


+ 1
- 1
dgl/src/pugl-upstream

@@ -1 +1 @@
Subproject commit 12b10e4bb38da3a88278becdf3c4f31ea1a86f32
Subproject commit 12640c9e41cd334f05c2a3d075c41db2c5bb7135

Loading…
Cancel
Save