os_add_listbox_string_and_data
int os_add_listbox_string_and_data(HWND parent_hwnd,int id,const everything_plugin_utf8_t *s,const void *data)
Add a string with reference data to a listbox.
Returns the index of the added string.
Returns LB_ERR on failure.
Updates the horizontal extent.
os_add_tooltip
void os_add_tooltip(HWND tooltip_hwnd,HWND parent_hwnd,int id,const everything_plugin_utf8_t *text)
Add a tooltip to a tooltip window.
os_browse_for_folder
int os_browse_for_folder(HWND parent_hwnd,const everything_plugin_utf8_t *title,const everything_plugin_utf8_t *default_folder,everything_plugin_utf8_buf_t *cbuf)
Show the modern system browse for folder dialog.
Returns 1 if a folder is selected successful.
Returns 0 if cancelled by the user.
title can be NULL.
default_folder can be NULL.
The selected folder path is stored in cbuf.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_center_dialog
void os_center_dialog(HWND parent_hwnd,HWND hwnd,int client_logical_wide,int client_logical_high)
Center the specified window relative to parent_hwnd.
If parent_hwnd is NULL the primary desktop is used.
os_clear_listbox
void os_clear_listbox(HWND parent_hwnd,int id)
Clear all items in a listbox.
Also resets the horizontal extent.
os_copy_memory
void os_copy_memory(void *dst,const void *src,uintptr_t size)
Copy memory from one location to another.
CopyMemory wrapper.
os_create_blank_dialog
void *os_create_blank_dialog(HWND parent_hwnd,const everything_plugin_utf8_t *class_name,const everything_plugin_utf8_t *title,int resizable,int modeless,DWORD extra_ex_style,DWORD extra_style,DLGPROC proc,void *param)
Create a blank dialog.
Returns the window handle if modeless.
Otherwise, returns the result from EndDialog.
class_name can be NULL.
os_create_button
HWND os_create_button(HWND parent_hwnd,int id,DWORD extra_window_style,const everything_plugin_utf8_t *text)
Creates a button dialog control.
Returns the button control window handle.
Sets the default dialog font.
os_create_edit
HWND os_create_edit(HWND parent_hwnd,int id,DWORD extra_style,const everything_plugin_utf8_t *text)
Creates an edit dialog control.
Returns the edit control window handle.
Sets the default dialog font.
os_create_group_box
HWND os_create_group_box(HWND parent_hwnd,int id,const everything_plugin_utf8_t *text)
Creates an group box dialog control.
Returns the group box control window handle.
Sets the default dialog font.
os_create_listbox
HWND os_create_listbox(HWND parent_hwnd,int id,DWORD extra_style)
Creates an listbox dialog control.
Returns the listbox control window handle.
Sets the default dialog font.
os_create_number_edit
HWND os_create_number_edit(HWND parent_hwnd,int id,DWORD extra_style,__int64 number)
Creates an edit dialog control with the ES_NUMBER style.
Returns the edit control window handle.
Sets the default dialog font.
os_create_password_edit
HWND os_create_password_edit(HWND parent_hwnd,int id,DWORD extra_style,const everything_plugin_utf8_t *text)
Creates an edit dialog control with the ES_PASSWORD style.
Returns the edit control window handle.
Sets the default dialog font.
os_create_static
HWND os_create_static(HWND parent_hwnd,int id,DWORD extra_window_style,const everything_plugin_utf8_t *text)
Creates a static text dialog control.
Returns the static control window handle.
Sets the default dialog font.
os_create_tooltip
HWND os_create_tooltip(void)
Creates a tooltip dialog control.
Returns the tooltip control window handle.
Sets the default dialog font.
See also:
os_add_tooltip
os_create_window
HWND os_create_window(DWORD dwExStyle,const everything_plugin_utf8_t *lpClassName,const everything_plugin_utf8_t *lpWindowName,DWORD dwStyle,int x,int y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam)
Creates a window.
Returns the window handle.
os_enable_or_disable_dlg_item
void os_enable_or_disable_dlg_item(HWND parent_hwnd,int id,int enable)
Enable or disable a dialog control.
os_event_create
HANDLE os_event_create(void)
Creates an unnamed event with manual reset and the initial state set to FALSE.
Returns the event handle.
The handle is always created.
Otherwise, Everything will exit with a fatal error.
os_event_is_set
int os_event_is_set(HANDLE h)
Check if an event has been set.
Returns 1 if the event is set.
Returns 0 if the event is not set.
os_expand_dialog_text_logical_wide_no_prefix
int os_expand_dialog_text_logical_wide_no_prefix(HWND parent_hwnd,const utf8_t *text,int wide)(HANDLE h)
Expands wide in logical pixels to accommodate room for the specified text using the default dialog font.
Returns the new width in logical pixels.
Use to keep dialog buttons widths consistent.
os_filetime_to_localtime
int os_filetime_to_localtime(SYSTEMTIME *localst,EVERYTHING_PLUGIN_QWORD ft)
Convert a filetime to a local system time using the correct day light savings.
Returns 1 if the conversion was successful.
Returns 0 on failure.
os_force_ltr_edit
void os_force_ltr_edit(HWND parent_hwnd,int id)
Force an edit dialog control to read left to right, even for RTL windows.
Ideal for edit boxes that specify paths.
os_get_app_data_path_cat_filename
void os_get_app_data_path_cat_filename(const everything_plugin_utf8_t *filename,everything_plugin_utf8_buf_t *cbuf)
Build the setting or data full path using the specified filename.
The full path is stored in cbuf.
This will either be %APPDATA%\Everything\filename or filename in the same location as your Everything.exe
Depending on your app_data setting.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_dlg_text
void os_get_dlg_text(HWND parent_hwnd,int id,everything_plugin_utf8_buf_t *cbuf)
Get the text from the specified dialog control.
The text is stored in cbuf.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_listbox_cur_sel
int os_get_listbox_cur_sel(HWND parent_hwnd,int id)
Get the current selection from the specified listbox dialog control.
Returns the current selection index.
Otherwise returns LB_ERR.
os_get_listbox_data
void *os_get_listbox_data(HWND parent_hwnd,int id,int index)
Get the user data associated with a listbox item.
Returns a pointer to the user data.
Returns NULL if index was not valid.
os_get_local_app_data_path_cat_filename
int os_get_local_app_data_path_cat_filename(const everything_plugin_utf8_t *filename,everything_plugin_utf8_buf_t *cbuf)
Build the data full path using the specified filename.
The full path is stored in cbuf.
This will either be %LOCALAPPDATA%\Everything\filename or filename in the same location as your Everything.exe
Depending on your app_data setting.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_local_app_data_path_cat_make_filename
void os_get_local_app_data_path_cat_make_filename(const everything_plugin_utf8_t *stem,const everything_plugin_utf8_t *extension,everything_plugin_utf8_buf_t *cbuf)
Build the data full path using the specified stem and extension.
The full path is stored in cbuf.
This will either be %LOCALAPPDATA%\Everything\stem.extension or stem.extension in the same location as your Everything.exe
Depending on your app_data setting.
extension should include the dot (.)
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_logical_high
int os_get_logical_high(void)
Returns the logical high multiplier.
Multiply by this number and divide by 96 to convert logical pixels to device pixels.
os_get_logical_wide
int os_get_logical_wide(void)
Returns the logical wide multiplier.
Multiply by this number and divide by 96 to convert logical pixels to device pixels.
os_get_open_file_name
int os_get_open_file_name(HWND parent_hwnd,const everything_plugin_utf8_t *title,const everything_plugin_utf8_t *initial_file,const everything_plugin_utf8_t *filter,uintptr_t filter_len,DWORD filter_index,const everything_plugin_utf8_t *default_extension,DWORD *out_filter_index,everything_plugin_utf8_buf_t *cbuf)
Show the modern system open file dialog.
Returns 1 if the user selected a file and clicked Open.
Returns 0 if the user cancelled the dialog.
title can be NULL.
initial_file can be NULL.
filter_len is the length of filter in UTF-8 bytes.
default_extension can be NULL.
default_extension should not include the dot (.)
The selected filename is stored in cbuf.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_open_file_name
int _plugin_os_get_save_file_name(HWND parent_hwnd,const everything_plugin_utf8_t *title,const everything_plugin_utf8_t *initial_file,everything_plugin_utf8_t *filter,uintptr_t filter_len,DWORD filter_index,const everything_plugin_utf8_t *default_extension,DWORD *out_filter_index,everything_plugin_utf8_buf_t *cbuf)
Show the modern system save as dialog.
Returns 1 if the user chose a filename and clicked Save.
Returns 0 if the user cancelled the dialog.
title can be NULL.
initial_file can be NULL.
filter_len is the length of filter in UTF-8 bytes.
default_extension can be NULL.
default_extension should not include the dot (.)
The selected filename is stored in cbuf.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_system_time_as_file_time
EVERYTHING_PLUGIN_QWORD os_get_system_time_as_file_time(void)
Returns the current system time as a filetime.
os_get_volume_label
void os_get_volume_label(const everything_plugin_utf8_t *volume_path,everything_plugin_utf8_buf_t *cbuf)
Gets the volume label from the specified volume path.
The volume label is stored in cbuf.
If there is no label, the default label based on the drive type is return. (for example: Local Disk)
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_get_window_user_data
void *os_get_window_user_data(HWND hwnd)
Return a pointer to user data from the specified window handle.
os_load_system_library
HMODULE os_load_system_library(const utf8_t *filename)
Safely load a system DLL.
Returns a module handle to the specified DLL.
os_make_sure_path_to_file_exists
void os_make_sure_path_to_file_exists(const everything_plugin_utf8_t *file_name)
Make sure the path to filename exists.
Any missing folders are created.
os_move_memory
void os_move_memory(void *dst,const void *src,uintptr_t size)
Copy memory with possible overlap.
MoveMemory wrapper.
os_open_file
HANDLE os_open_file(const everything_plugin_utf8_t *filename)
Open a file handle to the specified file.
Returns a handle to a file.
Returns INVALID_FILE_HANDLE if the file was not found.
The file is opened with GENERIC_READ access.
The file is opened with FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE sharing.
The file is opened with FILE_FLAG_SEQUENTIAL_SCAN.
os_open_url
void os_open_url(const everything_plugin_utf8_t *url)
Open the specified url in the default web browser.
http:// links are converted to https:// links.
https:// is added if not specified.
os_register_class
void os_register_class(UINT style,const everything_plugin_utf8_t *lpszClassName,WNDPROC lpfnWndProc,uintptr_t window_extra,HICON hIcon,HICON hIconSm,HCURSOR hcursor)
Register a window class name.
os_registry_get_string
int os_registry_get_string(HKEY root,const everything_plugin_utf8_t *key,const everything_plugin_utf8_t *value,everything_plugin_utf8_buf_t *cbuf)
Get a string value from the Windows registry.
Returns 1 if successful.
Returns 0 on failure.
The resulting value is stored in cbuf.
cbuf must be initialized with
utf8_buf_init
See also:
utf8_buf_init
os_resize_file
void os_resize_file(const everything_plugin_utf8_t *filename,uintptr_t max_size,uintptr_t delta_size)
Resize a log file.
If the file is larger than max_size, delta_size is removed from the start of the file.
Only whole lines are removed. Slightly more than delta_size can be removed from the start of the file.
os_set_default_button
void os_set_default_button(HWND parent_hwnd,int id)
Set the default dialog control.
os_set_default_button
void os_set_default_button(HWND parent_hwnd,int id)
Set the default dialog control.
os_set_dlg_rect
void os_set_dlg_rect(HWND parent_hwnd,int id,int x,int y,int wide,int high)
Set the default dialog control size and position in logical pixels.
os_set_dlg_redraw
void os_set_dlg_redraw(HWND parent_hwnd,int id,BOOL redraw)
Enable or disable redrawing for the specified dialog control.
If enabling redraw, the window and all child windows are invalidated.
os_set_dlg_text
int os_set_dlg_text(HWND hDlg,int nIDDlgItem,const everything_plugin_utf8_t *s)
Set the dialog control text field.
Returns 1 if successful.
Returns 0 on failure.
os_set_file_pointer
int os_set_file_pointer(HANDLE h,EVERYTHING_PLUGIN_QWORD position,int move_method)
Set the file read position.
Returns 1 if successful.
Returns 0 on failure.
move_method can be one of the following:
| FILE_BEGIN | 0 | The starting point is 0 (zero) or the beginning of the file. |
| FILE_CURRENT | 1 | The starting point is the current value of the file pointer. |
| FILE_END | 2 | The starting point is the current end-of-file position. |
os_set_listbox_cur_sel
void os_set_listbox_cur_sel(HWND parent_hwnd,int id,int index)
Set the listbox dialog control current selection.
os_set_window_user_data
void os_set_window_user_data(HWND hwnd,void *user_data)
Set the window user data pointer.
os_sort_MT
void os_sort_MT(void **indexes,uintptr_t count,int (*compare_proc)(const void *,const void *))
Perform a multi-threaded (MT) sort.
Like qsort, except indexes are used instead of data.
os_thread_cancel_synchronous_io
void os_thread_cancel_synchronous_io(everything_plugin_os_thread_t *thread)
Cancel any synchronous IO in progress.
A CancelSynchronousIo wrapper.
os_thread_create
everything_plugin_os_thread_t *os_thread_create(DWORD (WINAPI *thread_proc)(void *),void *param)
Create a thread.
Returns a pointer to the thread handle.
Everything will throw a fatal error if there is not enough system resources.
Threads are allocated from a pool of threads.
The returned thread will always start with THREAD_PRIORITY_NORMAL priority.
The thread is initialized with CoInitializeEx(NULL,COINIT_APARTMENTTHREADED);
Closing a thread will add it back to the pool of threads.
See also:
os_thread_wait_and_close
os_thread_wait_and_close
void os_thread_wait_and_close(everything_plugin_os_thread_t *t)
Wait for the thread to complete and close the thread handle.
The thread is added to the thread pool to be reused.
The thread priority is reset.
os_winsock_WSAAsyncSelect
int os_winsock_WSAAsyncSelect(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,HWND hWnd,unsigned int wMsg,long lEvent)
WSAAsyncSelect wrapper.
os_winsock_WSACleanup
int os_winsock_WSACleanup(void)
WSACleanup wrapper.
os_winsock_WSACloseEvent
BOOL os_winsock_WSACloseEvent(EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT hEvent)
WSACloseEvent wrapper.
os_winsock_WSACreateEvent
EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT os_winsock_WSACreateEvent(void)
WSACreateEvent wrapper.
os_winsock_WSAEnumNetworkEvents
int os_winsock_WSAEnumNetworkEvents(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT hEventObject,EVERYTHING_PLUGIN_OS_WINSOCK_WSANETWORKEVENTS *lpNetworkEvents)
WSAEnumNetworkEvents wrapper.
os_winsock_WSAEventSelect
int os_winsock_WSAEventSelect(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT hEventObject,long lNetworkEvents)
WSAEventSelect wrapper.
os_winsock_WSAGetLastError
int os_winsock_WSAGetLastError(void)
WSAGetLastError wrapper.
os_winsock_WSARecv
int os_winsock_WSARecv(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,EVERYTHING_PLUGIN_OS_WINSOCK_WSABUF *lpBuffers,DWORD dwBufferCount,LPDWORD lpNumberOfBytesRecvd,DWORD *lpFlags,EVERYTHING_PLUGIN_OS_WINSOCK_LPWSAOVERLAPPED lpOverlapped,EVERYTHING_PLUGIN_OS_WINSOCK_LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
WSARecv wrapper.
os_winsock_WSAResetEvent
BOOL os_winsock_WSAResetEvent(EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT hEvent)
WSAResetEvent wrapper.
os_winsock_WSASend
int os_winsock_WSASend(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,EVERYTHING_PLUGIN_OS_WINSOCK_WSABUF *lpBuffers,DWORD dwBufferCount,LPDWORD lpNumberOfBytesSent,DWORD dwFlags,EVERYTHING_PLUGIN_OS_WINSOCK_LPWSAOVERLAPPED lpOverlapped,EVERYTHING_PLUGIN_OS_WINSOCK_LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
WSASend wrapper.
os_winsock_WSASetEvent
BOOL os_winsock_WSASetEvent(EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT hEvent)
WSASetEvent wrapper.
os_winsock_WSAStartup
int os_winsock_WSAStartup(WORD wVersionRequested,EVERYTHING_PLUGIN_OS_WINSOCK_WSADATA *lpWSAData)
WSAStartup wrapper.
1.1 for wVersionRequested is recommended for the best compatibility with other plugins.
os_winsock_WSAWaitForMultipleEvents
DWORD os_winsock_WSAWaitForMultipleEvents(DWORD cEvents,const EVERYTHING_PLUGIN_OS_WINSOCK_WSAEVENT *lphEvents,BOOL fWaitAll,DWORD dwTimeout,BOOL fAlertable)
WSAWaitForMultipleEvents wrapper.
os_winsock_accept
EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET os_winsock_accept(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,struct everything_plugin_os_winsock_sockaddr *addr,int *addrlen)
accept wrapper.
os_winsock_bind
int os_winsock_bind(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,const struct everything_plugin_os_winsock_sockaddr *name,int namelen)
bind wrapper.
os_winsock_closesocket
int os_winsock_closesocket(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s)
closesocket wrapper.
os_winsock_connect
int os_winsock_connect(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,const struct everything_plugin_os_winsock_sockaddr *name,int namelen)
connect wrapper.
os_winsock_freeaddrinfo
void os_winsock_freeaddrinfo(struct everything_plugin_os_addrinfo *ai)
freeaddrinfo wrapper.
os_winsock_getaddrinfo
int os_winsock_getaddrinfo(const char *nodename,const char *servname,const struct everything_plugin_os_addrinfo *hints,struct everything_plugin_os_addrinfo **res)
getaddrinfo wrapper.
os_winsock_getpeername
int os_winsock_getpeername(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,struct everything_plugin_os_winsock_sockaddr *name,int *namelen)
getpeername wrapper.
os_winsock_getsockname
int os_winsock_getsockname(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,struct everything_plugin_os_winsock_sockaddr *name,int *namelen)
getsockname wrapper.
os_winsock_listen
int os_winsock_listen(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,int backlog)
listen wrapper.
os_winsock_ntohs
unsigned short os_winsock_ntohs(unsigned short netshort)
ntohs wrapper.
os_winsock_shutdown
int os_winsock_shutdown(EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET s,int how)
shutdown wrapper.
os_winsock_socket
EVERYTHING_PLUGIN_OS_WINSOCK_SOCKET os_winsock_socket(int af,int type,int protocol)
socket wrapper.
os_zero_memory
void os_zero_memory(void *ptr,uintptr_t size)
Zero memory at the specified address with the specified size.
ZeroMemory wrapper.