mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
mouse-driven ui path for query completion; show-in-explorer ui for tab ctx menu
This commit is contained in:
+6
-1
@@ -170,8 +170,13 @@ internal F32 os_caret_blink_time(void);
|
||||
internal F32 os_default_refresh_rate(void);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Native Messages & Panics (Implemented Per-OS)
|
||||
//~ rjf: @os_hooks Native User-Facing Graphical Messages (Implemented Per-OS)
|
||||
|
||||
internal void os_graphical_message(B32 error, String8 title, String8 message);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Shell Operations
|
||||
|
||||
internal void os_show_in_filesystem_ui(String8 path);
|
||||
|
||||
#endif // OS_GRAPHICAL_H
|
||||
|
||||
@@ -240,9 +240,17 @@ os_granular_sleep_enabled(void)
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Native Messages & Panics (Implemented Per-OS)
|
||||
//~ rjf: @os_hooks Native User-Facing Graphical Messages (Implemented Per-OS)
|
||||
|
||||
internal void
|
||||
os_graphical_message(B32 error, String8 title, String8 message)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Shell Operations
|
||||
|
||||
internal void
|
||||
os_show_in_filesystem_ui(String8 path)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1421,7 +1421,7 @@ os_default_refresh_rate(void)
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Native Messages & Panics (Implemented Per-OS)
|
||||
//~ rjf: @os_hooks Native User-Facing Graphical Messages (Implemented Per-OS)
|
||||
|
||||
internal void
|
||||
os_graphical_message(B32 error, String8 title, String8 message)
|
||||
@@ -1432,3 +1432,30 @@ os_graphical_message(B32 error, String8 title, String8 message)
|
||||
MessageBoxW(0, (WCHAR *)message16.str, (WCHAR *)title16.str, MB_OK|(!!error*MB_ICONERROR));
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Shell Operations
|
||||
|
||||
internal void
|
||||
os_show_in_filesystem_ui(String8 path)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
String8 path_copy = push_str8_copy(scratch.arena, path);
|
||||
for(U64 idx = 0; idx < path_copy.size; idx += 1)
|
||||
{
|
||||
if(path_copy.str[idx] == '/')
|
||||
{
|
||||
path_copy.str[idx] = '\\';
|
||||
}
|
||||
}
|
||||
String16 path16 = str16_from_8(scratch.arena, path_copy);
|
||||
SFGAOF flags = 0;
|
||||
PIDLIST_ABSOLUTE list = 0;
|
||||
if(path16.size != 0 && SUCCEEDED(SHParseDisplayName(path16.str, 0, &list, 0, &flags)))
|
||||
{
|
||||
HRESULT hr = SHOpenFolderAndSelectItems(list, 0, 0, 0);
|
||||
CoTaskMemFree(list);
|
||||
(void)hr;
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user