diff options
author | Thomas White <taw@physics.org> | 2020-08-25 15:53:34 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-25 15:56:25 +0200 |
commit | c783ee20a9c3297f097429ac02595628981e1555 (patch) | |
tree | 4edb0adce674e16f76fc7dd856c4738fe70d1072 /src/gui_project.h | |
parent | 0f96cae079fe8b278819c572dc56b4d40dc47c06 (diff) |
Create a progress bar for each running job
Diffstat (limited to 'src/gui_project.h')
-rw-r--r-- | src/gui_project.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gui_project.h b/src/gui_project.h index e3066b5f..d2a78079 100644 --- a/src/gui_project.h +++ b/src/gui_project.h @@ -34,6 +34,7 @@ #include <peaks.h> #include <stream.h> +#define MAX_RUNNING_TASKS (16) enum match_type_id { @@ -103,7 +104,7 @@ struct crystfel_backend { void *opts_priv); /* Called to ask the backend to cancel the job */ - void (*cancel_indexing)(void *job_priv); + void (*cancel_task)(void *job_priv); /* Called to ask the backend to write its indexing options */ void (*write_indexing_opts)(void *opts_priv, FILE *fh); @@ -118,6 +119,14 @@ struct crystfel_backend { }; +struct gui_task +{ + GtkWidget *info_bar; + GtkWidget *progress_bar; + struct crystfel_backend *backend; + void *job_priv; +}; + struct crystfelproject { GtkWidget *window; @@ -168,8 +177,8 @@ struct crystfelproject { struct crystfel_backend *backends; int n_backends; - GtkWidget *info_bar; - GtkWidget *progressbar; + struct gui_task tasks[MAX_RUNNING_TASKS]; + int n_running_tasks; }; extern enum match_type_id decode_matchtype(const char *type_id); |