Blender V2.61 - r43446
|
#include <string.h>
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_threads.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_window.h"
#include "wm_event_system.h"
#include "wm_event_types.h"
#include "wm.h"
Go to the source code of this file.
Classes | |
struct | wmJob |
Functions | |
static wmJob * | wm_job_find (wmWindowManager *wm, void *owner, const char *name) |
wmJob * | WM_jobs_get (wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag) |
int | WM_jobs_test (wmWindowManager *wm, void *owner) |
float | WM_jobs_progress (wmWindowManager *wm, void *owner) |
char * | WM_jobs_name (wmWindowManager *wm, void *owner) |
int | WM_jobs_is_running (wmJob *steve) |
void * | WM_jobs_get_customdata (wmJob *steve) |
void | WM_jobs_customdata (wmJob *steve, void *customdata, void(*free)(void *)) |
void | WM_jobs_timer (wmJob *steve, double timestep, unsigned int note, unsigned int endnote) |
void | WM_jobs_callbacks (wmJob *steve, void(*startjob)(void *, short *, short *, float *), void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *)) |
static void * | do_job_thread (void *job_v) |
static void | wm_jobs_test_suspend_stop (wmWindowManager *wm, wmJob *test) |
void | WM_jobs_start (wmWindowManager *wm, wmJob *steve) |
static void | wm_jobs_kill_job (wmWindowManager *wm, wmJob *steve) |
void | WM_jobs_stop_all (wmWindowManager *wm) |
void | WM_jobs_stop (wmWindowManager *wm, void *owner, void *startjob) |
void | WM_jobs_kill (wmWindowManager *wm, void *owner, void(*startjob)(void *, short int *, short int *, float *)) |
void | wm_jobs_timer_ended (wmWindowManager *wm, wmTimer *wt) |
void | wm_jobs_timer (const bContext *C, wmWindowManager *wm, wmTimer *wt) |
int | WM_jobs_has_running (wmWindowManager *wm) |
Definition in file wm_jobs.c.
static void* do_job_thread | ( | void * | job_v | ) | [static] |
Definition at line 251 of file wm_jobs.c.
References wmJob::do_update, NULL, wmJob::progress, wmJob::ready, wmJob::run_customdata, wmJob::startjob, and wmJob::stop.
Referenced by WM_jobs_start().
static wmJob* wm_job_find | ( | wmWindowManager * | wm, |
void * | owner, | ||
const char * | name | ||
) | [static] |
Definition at line 135 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::name, wmJob::next, NULL, and wmJob::owner.
Referenced by WM_jobs_get(), WM_jobs_name(), and WM_jobs_progress().
void WM_jobs_callbacks | ( | wmJob * | steve, |
void(*)(void *, short *, short *, float *) | startjob, | ||
void(*)(void *) | initjob, | ||
void(*)(void *) | update, | ||
void(*)(void *) | endjob | ||
) |
Definition at line 239 of file wm_jobs.c.
References wmJob::endjob, wmJob::initjob, wmJob::startjob, update(), and wmJob::update.
Referenced by clip_rebuild_proxy_exec(), ED_preview_icon_job(), ED_preview_shader_job(), multiresbake_image_exec(), objects_bake_render_invoke(), ocean_bake_exec(), screen_render_invoke(), screencast_exec(), seq_proxy_build_job(), snode_composite_job(), solve_camera_invoke(), thumbnails_start(), and track_markers_invoke().
void WM_jobs_customdata | ( | wmJob * | steve, |
void * | customdata, | ||
void(*)(void *) | free | ||
) |
Definition at line 217 of file wm_jobs.c.
References wmJob::customdata, addon::engine::free(), wmJob::free, wmJob::running, and wmJob::stop.
Referenced by clip_rebuild_proxy_exec(), ED_preview_icon_job(), ED_preview_shader_job(), multiresbake_image_exec(), objects_bake_render_invoke(), ocean_bake_exec(), screen_render_invoke(), screencast_exec(), seq_proxy_build_job(), snode_composite_job(), solve_camera_invoke(), thumbnails_start(), and track_markers_invoke().
wmJob* WM_jobs_get | ( | wmWindowManager * | wm, |
wmWindow * | win, | ||
void * | owner, | ||
const char * | name, | ||
int | flag | ||
) | [read] |
Definition at line 154 of file wm_jobs.c.
References BLI_addtail(), BLI_strncpy(), wmJob::flag, wmWindowManager::jobs, MEM_callocN(), wmJob::name, NULL, wmJob::owner, wmJob::win, and wm_job_find().
Referenced by clip_rebuild_proxy_exec(), ED_preview_icon_job(), ED_preview_shader_job(), multiresbake_image_exec(), objects_bake_render_invoke(), ocean_bake_exec(), screen_render_invoke(), screencast_exec(), seq_proxy_build_job(), snode_composite_job(), solve_camera_invoke(), thumbnails_start(), and track_markers_invoke().
void* WM_jobs_get_customdata | ( | wmJob * | steve | ) |
Definition at line 208 of file wm_jobs.c.
References wmJob::customdata, and wmJob::run_customdata.
Referenced by seq_proxy_build_job().
int WM_jobs_has_running | ( | wmWindowManager * | wm | ) |
Definition at line 515 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::next, and wmJob::running.
int WM_jobs_is_running | ( | wmJob * | steve | ) |
Definition at line 203 of file wm_jobs.c.
References wmJob::running.
Referenced by seq_proxy_build_job().
void WM_jobs_kill | ( | wmWindowManager * | wm, |
void * | owner, | ||
void(*)(void *, short int *, short int *, float *) | startjob | ||
) |
Definition at line 393 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::next, wmJob::owner, wmJob::startjob, and wm_jobs_kill_job().
Referenced by ED_preview_kill_jobs(), and thumbnails_stop().
static void wm_jobs_kill_job | ( | wmWindowManager * | wm, |
wmJob * | steve | ||
) | [static] |
Definition at line 348 of file wm_jobs.c.
References BLI_end_threads(), BLI_remlink(), wmJob::customdata, wmJob::endjob, wmJob::free, wmWindowManager::jobs, MEM_freeN(), wmJob::run_customdata, wmJob::run_free, wmJob::running, wmJob::stop, wmJob::threads, wmJob::win, WM_event_remove_timer(), and wmJob::wt.
Referenced by WM_jobs_kill(), WM_jobs_stop_all(), and wm_jobs_timer_ended().
char* WM_jobs_name | ( | wmWindowManager * | wm, |
void * | owner | ||
) |
Definition at line 193 of file wm_jobs.c.
References wmJob::name, NULL, and wm_job_find().
Referenced by uiTemplateRunningJobs().
float WM_jobs_progress | ( | wmWindowManager * | wm, |
void * | owner | ||
) |
Definition at line 183 of file wm_jobs.c.
References wmJob::flag, NULL, wmJob::progress, wm_job_find(), and WM_JOB_PROGRESS.
Referenced by uiTemplateRunningJobs().
void WM_jobs_start | ( | wmWindowManager * | wm, |
wmJob * | steve | ||
) |
Definition at line 305 of file wm_jobs.c.
References BLI_init_threads(), BLI_insert_thread(), wmJob::customdata, do_job_thread(), wmJob::free, wmJob::initjob, NULL, wmJob::progress, wmJob::ready, wmJob::run_customdata, wmJob::run_free, wmJob::running, wmJob::startjob, wmJob::stop, wmJob::suspended, wmJob::threads, TIMERJOBS, wmJob::timestep, wmJob::win, WM_event_add_timer(), wm_jobs_test_suspend_stop(), and wmJob::wt.
Referenced by clip_rebuild_proxy_exec(), ED_preview_icon_job(), ED_preview_shader_job(), multiresbake_image_exec(), objects_bake_render_invoke(), ocean_bake_exec(), screen_render_invoke(), screencast_exec(), seq_proxy_build_job(), snode_composite_job(), solve_camera_invoke(), thumbnails_start(), track_markers_invoke(), and wm_jobs_timer().
void WM_jobs_stop | ( | wmWindowManager * | wm, |
void * | owner, | ||
void * | startjob | ||
) |
Definition at line 382 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::next, wmJob::owner, wmJob::running, wmJob::startjob, and wmJob::stop.
Referenced by do_running_jobs().
void WM_jobs_stop_all | ( | wmWindowManager * | wm | ) |
Definition at line 372 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, and wm_jobs_kill_job().
Referenced by read_undosave(), screen_opengl_render_init(), screen_render_invoke(), WM_exit_ext(), and wm_window_match_init().
int WM_jobs_test | ( | wmWindowManager * | wm, |
void * | owner | ||
) |
Definition at line 172 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::next, wmJob::owner, and wmJob::running.
Referenced by ED_undo_operator_repeat(), ed_undo_step(), objects_bake_render_invoke(), objects_bake_render_modal(), screen_opengl_render_init(), screen_render_invoke(), screen_render_modal(), solve_camera_invoke(), solve_camera_modal(), thumbnails_running(), track_markers_invoke(), track_markers_modal(), uiTemplateRunningJobs(), and WM_operator_check_ui_enabled().
static void wm_jobs_test_suspend_stop | ( | wmWindowManager * | wm, |
wmJob * | test | ||
) | [static] |
Definition at line 262 of file wm_jobs.c.
References ListBase::first, wmJob::flag, wmWindowManager::jobs, wmJob::next, wmJob::running, wmJob::startjob, wmJob::stop, wmJob::suspended, WM_JOB_EXCL_RENDER, WM_JOB_PRIORITY, and WM_JOB_SUSPEND.
Referenced by WM_jobs_start().
void wm_jobs_timer | ( | const bContext * | C, |
wmWindowManager * | wm, | ||
wmTimer * | wt | ||
) |
Definition at line 424 of file wm_jobs.c.
References BLI_end_threads(), BLI_remlink(), wmJob::customdata, wmJob::do_update, wmJob::endjob, wmJob::endnote, ListBase::first, wmJob::flag, wmWindowManager::jobs, MEM_freeN(), NC_WM, ND_JOB, wmJob::next, wmJob::note, NULL, wmJob::progress, wmJob::ready, wmJob::run_customdata, wmJob::run_free, wmJob::running, wmJob::suspended, wmJob::threads, wmJob::update, wmJob::win, wmWindowManager::winactive, WM_event_add_notifier(), WM_event_remove_timer(), WM_JOB_PROGRESS, WM_jobs_start(), WM_progress_clear(), WM_progress_set(), and wmJob::wt.
Referenced by wm_window_timer().
void WM_jobs_timer | ( | wmJob * | steve, |
double | timestep, | ||
unsigned int | note, | ||
unsigned int | endnote | ||
) |
Definition at line 232 of file wm_jobs.c.
References wmJob::endnote, wmJob::note, and wmJob::timestep.
Referenced by clip_rebuild_proxy_exec(), ED_preview_icon_job(), ED_preview_shader_job(), multiresbake_image_exec(), objects_bake_render_invoke(), ocean_bake_exec(), screen_render_invoke(), screencast_exec(), seq_proxy_build_job(), snode_composite_job(), solve_camera_invoke(), thumbnails_start(), and track_markers_invoke().
void wm_jobs_timer_ended | ( | wmWindowManager * | wm, |
wmTimer * | wt | ||
) |
Definition at line 411 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, wmJob::next, wm_jobs_kill_job(), and wmJob::wt.
Referenced by wm_window_free().