This abstract struct represents all the common calls that any backend must have.
More...
#include <desk_up_window_device.h>
This abstract struct represents all the common calls that any backend must have.
There are multiple pointers to functions inside this struct. Each one of them gets connected to a backend function whenever the backend gets created. When invoking the pointer, it implicitly calls the correct backend function, thus giving the expected result for that specific backend. This struct also carries specific backend information needed to get information from a backend successfully.
- See also
- windowData
- Author
- Nicolas Serrano Garcia serra.nosp@m.noga.nosp@m.rcian.nosp@m.icol.nosp@m.as@gm.nosp@m.ail..nosp@m.com
- Version
- 0.1.0
- Date
- 2025
◆ closeProcessFromPath
A pointer to function that is used to close all the windows associated with a given path.
- Parameters
-
| _this | The very same instance |
| path | a std::string instance that represents the path |
| allowForce | Whether if the call should force the program to close |
- Returns
- The number of closed windows from a specific app
- Version
- 0.2.0
- Date
- 2025
◆ DestroyDevice
A pointer to function that is used to delete the device.
Each device defines it's own deleter, which then gets called in the wrapper DU_destroy inside window_core.cc
- Parameters
-
| _this | The very same instance |
- Version
- 0.3.2
- Date
- 2025
◆ getAllOpenWindows
A pointer to function that is used to get a list of abstract windows.
For any backend to return the same thing, an abstract struct representing a windows is created. Regardless of the implementation, every device returns a vector of this type.
- Parameters
-
| _this | The very same instance |
- Returns
- An
std::vector representing all the visible and non-minimized windows currently open
- Version
- 0.1.0
- Date
- 2025
◆ getDeskUpPath
| DeskUp::Result< std::string >(* DeskUpWindowDevice::getDeskUpPath) (void) |
A pointer to function that is used to get the generic DeskUp workspaces path.
The return path is the path to the top-level folder where all the user workspaces are saved. A workspace whose name is "foo" will have it's information saved in getDeskUpPath() + "/foo"
- Returns
- An
std::string representing the path to the top-level Desk Up workspaces folder
- Version
- 0.1.0
- Date
- 2025
◆ getPathFromWindow
A pointer to function that is used to get the path to the executable that created the window.
- Parameters
-
| _this | The very same instance |
- Returns
- An
filesystem::path representing the path of the window
- Version
- 0.1.0
- Date
- 2025
◆ getWindowHeight
A pointer to function that is used to get the height of a window.
- Parameters
-
| _this | The very same instance |
- Returns
- An
unsigned int representing the height of the window
- Version
- 0.1.0
- Date
- 2025
◆ getWindowWidth
A pointer to function that is used to get the width of a window.
- Parameters
-
| _this | The very same instance |
- Returns
- An
unsigned int representing the width of the window
- Version
- 0.1.0
- Date
- 2025
◆ getWindowXPos
A pointer to function that is used to get the X position of a the top left corner of a window.
- Parameters
-
| _this | The very same instance |
- Returns
- An
int representing the X position of the top left corner of a window
- Version
- 0.1.0
- Date
- 2025
◆ getWindowYPos
A pointer to function that is used to get the Y position of a the top left corner of a window.
- Parameters
-
| _this | The very same instance |
- Returns
- An
int representing the Y position of the top left corner of a window
- Version
- 0.1.0
- Date
- 2025
◆ internalData
| void* DeskUpWindowDevice::internalData |
A pointer that points to the specific information needed by each backend.
each backend defines WindowData, which is the template to seek the values of this pointer. Whenever a device call wants to access backend-specific info, this pointer gets casted to windowData* by std::reinterpret_cast. Then the backend accesses whatever information it needs. Finally, the same call casts back this pointer to void* , leaving everything as it was. One can interpret this pointer as a "black box", or a "pouch", where the info gets thrown inside, and then reinterpreted back whenever it is needed
- Version
- 0.1.0
- Date
- 2025
◆ loadWindowFromPath
A pointer to function that is used to open a window from a given path.
If the path is empty,
- Parameters
-
| _this | The very same instance |
| path | a const char* to the executable |
- Returns
void
- Version
- 0.2.0
- Date
- 2025
◆ recoverSavedWindow
A pointer to function that is used to recover a window from a deskUp file, which shall be located inside appData\DeskUp.
- Parameters
-
| _this | The very same instance |
| path | a const char* to the executable |
- Returns
- A
windowDesc representing the recovered window. If any of the recovery processes fails, the associated field will be set to the default value for it's type (int 0 and string "")
- Version
- 0.2.0
- Date
- 2025
◆ resizeWindow
A pointer to function that is used to resize a given window.
Information about the window whose geometry is intended to modify must be specified inside the _this->internalData parameter
- Parameters
-
| _this | The very same instance |
| path | a windowDesc instance whose geometry wants to be used for the resizing |
- Returns
- A
void
- Version
- 0.2.0
- Date
- 2025
The documentation for this struct was generated from the following file: