DeskUp 0.3
Loading...
Searching...
No Matches
window_desc.h File Reference

Defines the abstract data structure used to represent a window in DeskUp. More...

Include dependency graph for window_desc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  windowDesc
 Describes a single window instance in the DeskUp system. More...

Enumerations

enum  SaveErrorCode {
  SAVE_SUCCESS = 1 , ERR_EMPTY_PATH = -1 , ERR_FILE_NOT_OPEN = -2 , ERR_NO_PERMISSION = -3 ,
  ERR_FILE_NOT_FOUND = -4 , ERR_DISK_FULL = -5 , ERR_UNKNOWN = -6
}
 Enumerates possible results and error codes for windowDesc::saveTo(). More...

Detailed Description

Defines the abstract data structure used to represent a window in DeskUp.

This file is part of DeskUp

The windowDesc structure stores all the necessary information about a window so that DeskUp can identify and restore its original state (position, size, and associated executable). It acts as a generic abstraction that can be populated by any backend (e.g., Windows, Linux, macOS).

Each backend fills in the fields using its native APIs (for example, WIN_getAllOpenWindows() in the Windows implementation).

See also
windowDesc::saveTo()
WIN_getAllOpenWindows()
Version
0.1.0
Date
2025

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Enumeration Type Documentation

◆ SaveErrorCode

Enumerates possible results and error codes for windowDesc::saveTo().

This enumeration defines all return codes used by windowDesc::saveTo() to indicate whether the save operation succeeded or failed, and if failed, what type of error occurred.

Positive values indicate success; negative values indicate different failure modes, allowing callers (and the backend) to interpret the cause precisely and propagate appropriate DeskUp::Error levels.

See also
windowDesc::saveTo()
Version
0.2.1
Date
2025
Enumerator
SAVE_SUCCESS 

File successfully written.

Indicates that the window description was saved without issues.

ERR_EMPTY_PATH 

The provided file path is empty.

Returned when saveTo() receives an empty path parameter.

ERR_FILE_NOT_OPEN 

The target file could not be opened.

The file may not exist or may be locked by another process.

ERR_NO_PERMISSION 

Insufficient permissions to write the file.

The current process lacks write access to the target directory.

ERR_FILE_NOT_FOUND 

File not found or directory path invalid.

Returned when the parent path of the target file does not exist.

ERR_DISK_FULL 

Disk or storage device is full.

The save operation could not complete because the disk ran out of space.

ERR_UNKNOWN 

Unknown or unexpected error during save.

A generic failure when no specific condition above matches.