Blender V5.0
BLI_winstuff.h File Reference

Compatibility-like things for windows. More...

#include "BLI_sys_types.h"
#include <windows.h>

Go to the source code of this file.

Classes

struct  dirent

Macros

#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#define _USE_MATH_DEFINES
#define S_ISREG(x)
#define S_ISDIR(x)

Typedefs

typedef unsigned int mode_t
typedef struct __dirstream DIR

Enumerations

enum class  QoSMode { DEFAULT = 0 , HIGH = 1 , ECO = 2 }
enum class  QoSPrecedence { JOB = 0 , CMDLINE_ARG = 1 }

Functions

DIRopendir (const char *path)
struct direntreaddir (DIR *dp)
int closedir (DIR *dp)
const char * dirname (char *path)
bool BLI_windows_is_store_install (void)
bool BLI_windows_register_blend_extension (bool all_users)
bool BLI_windows_unregister_blend_extension (bool all_users)
bool BLI_windows_update_pinned_launcher (const char *launcher_path)
bool BLI_windows_get_directx_driver_version (const wchar_t *deviceSubString, long long *r_driverVersion)
bool BLI_windows_is_build_version_greater_or_equal (DWORD majorVersion, DWORD minorVersion, DWORD buildNumber)
void BLI_windows_get_default_root_dir (char root_dir[4])
int BLI_windows_get_executable_dir (char r_dirpath[])
bool BLI_windows_external_operation_supported (const char *filepath, const char *operation)
bool BLI_windows_external_operation_execute (const char *filepath, const char *operation)
bool BLI_windows_execute_self (const char *parameters, const bool wait, const bool elevated, const bool silent)
void BLI_windows_process_set_qos (QoSMode qos_mode, QoSPrecedence qos_precedence)

Detailed Description

Compatibility-like things for windows.

Definition in file BLI_winstuff.h.

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 42 of file BLI_winstuff.h.

◆ NOMINMAX

#define NOMINMAX

Definition at line 21 of file BLI_winstuff.h.

◆ S_ISDIR

◆ S_ISREG

#define S_ISREG ( x)

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 18 of file BLI_winstuff.h.

Typedef Documentation

◆ DIR

typedef struct __dirstream DIR

Intentionally opaque to users.

Definition at line 71 of file BLI_winstuff.h.

◆ mode_t

Definition at line 60 of file BLI_winstuff.h.

Enumeration Type Documentation

◆ QoSMode

enum class QoSMode
strong

Quality of Service (QoS) modes as defined in the Windows documentation at: https://learn.microsoft.com/en-us/windows/win32/procthread/quality-of-service

Enumerator
DEFAULT 

Default mode uses heuristics described in Windows docs.

HIGH 

HighQoS mode for performance critical scenarios.

ECO 

EcoQoS mode for preserving energy.

Definition at line 125 of file BLI_winstuff.h.

◆ QoSPrecedence

enum class QoSPrecedence
strong

QoS precedence (to make sure command line args overwrite what is set by jobs). Higher values have more precedence.

Enumerator
JOB 

QoS mode requested set via the job system.

CMDLINE_ARG 

QoS mode requested set via a command line argument.

Definition at line 136 of file BLI_winstuff.h.

Function Documentation

◆ BLI_windows_execute_self()

bool BLI_windows_execute_self ( const char * parameters,
const bool wait,
const bool elevated,
const bool silent )

Launch our own executable.

Parameters
parametersapplication parameters separated by spaces.
waitwhether to wait for the instance to exit.
elevatedrun as administrator. Will do UAC prompt.
silentNot show the launched program.

Referenced by WM_platform_associate_set().

◆ BLI_windows_external_operation_execute()

bool BLI_windows_external_operation_execute ( const char * filepath,
const char * operation )

◆ BLI_windows_external_operation_supported()

bool BLI_windows_external_operation_supported ( const char * filepath,
const char * operation )

◆ BLI_windows_get_default_root_dir()

void BLI_windows_get_default_root_dir ( char root_dir[4])

Set the root_dir to the default root directory on MS-Windows, The string is guaranteed to be set with a length of 3 & null terminated, using a fall-back in case the root directory can't be found.

Referenced by BKE_appdir_folder_root(), BLI_path_abs(), BLI_path_rel(), and parent_dir_until_exists_or_default_root().

◆ BLI_windows_get_directx_driver_version()

bool BLI_windows_get_directx_driver_version ( const wchar_t * deviceSubString,
long long * r_driverVersion )

◆ BLI_windows_get_executable_dir()

int BLI_windows_get_executable_dir ( char r_dirpath[])

◆ BLI_windows_is_build_version_greater_or_equal()

bool BLI_windows_is_build_version_greater_or_equal ( DWORD majorVersion,
DWORD minorVersion,
DWORD buildNumber )

◆ BLI_windows_is_store_install()

bool BLI_windows_is_store_install ( void )

◆ BLI_windows_process_set_qos()

void BLI_windows_process_set_qos ( QoSMode qos_mode,
QoSPrecedence qos_precedence )

Sets the Quality of Service (QoS) mode of the process.

Parameters
qos_modeThe QoS mode to use for the process.
qos_precedenceThe precedence of the caller (higher wins).

Referenced by arg_handle_qos_set(), and wm_jobs_update_qos().

◆ BLI_windows_register_blend_extension()

bool BLI_windows_register_blend_extension ( bool all_users)

◆ BLI_windows_unregister_blend_extension()

bool BLI_windows_unregister_blend_extension ( bool all_users)

◆ BLI_windows_update_pinned_launcher()

bool BLI_windows_update_pinned_launcher ( const char * launcher_path)

◆ closedir()

◆ dirname()

◆ opendir()

◆ readdir()