fortplot_system_viewer Module

System viewer launching for show() functionality Handles platform-specific viewer launching and graphical session detection



Functions

public function has_graphical_session() result(has_display)

Check if a graphical session is available Returns .true. if X11, Wayland, macOS GUI, or Windows GUI available

Arguments

None

Return Value logical


Subroutines

public subroutine launch_system_viewer(filename, success)

Launch system viewer for file Uses xdg-open on Linux, open on macOS, start on Windows

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(out) :: success

public subroutine get_temp_filename(extension, filename)

Generate unique temporary filename with proper platform handling

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: extension
character(len=*), intent(out) :: filename

public subroutine cleanup_temp_file(filename)

Remove temporary file (best effort, no error on failure)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename