Blender
V3.3
|
#include <errno.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "screen_intern.h"
Go to the source code of this file.
Classes | |
struct | ScreenshotData |
Typedefs | |
typedef struct ScreenshotData | ScreenshotData |
Functions | |
static int | screenshot_data_create (bContext *C, wmOperator *op, ScrArea *area) |
static void | screenshot_data_free (wmOperator *op) |
static int | screenshot_exec (bContext *C, wmOperator *op) |
static int | screenshot_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static bool | screenshot_check (bContext *UNUSED(C), wmOperator *op) |
static void | screenshot_cancel (bContext *UNUSED(C), wmOperator *op) |
static bool | screenshot_draw_check_prop (PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data)) |
static void | screenshot_draw (bContext *UNUSED(C), wmOperator *op) |
static bool | screenshot_poll (bContext *C) |
static void | screen_screenshot_impl (wmOperatorType *ot) |
void | SCREEN_OT_screenshot (wmOperatorType *ot) |
void | SCREEN_OT_screenshot_area (wmOperatorType *ot) |
Making screenshots of the entire window or sub-regions.
Definition in file screendump.c.
typedef struct ScreenshotData ScreenshotData |
void SCREEN_OT_screenshot | ( | wmOperatorType * | ot | ) |
Definition at line 247 of file screendump.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, and screen_screenshot_impl().
Referenced by ED_operatortypes_screen().
void SCREEN_OT_screenshot_area | ( | wmOperatorType * | ot | ) |
Definition at line 258 of file screendump.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, ot, and screen_screenshot_impl().
Referenced by ED_operatortypes_screen().
|
static |
Definition at line 229 of file screendump.c.
References wmOperatorType::cancel, wmOperatorType::check, wmOperatorType::exec, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_IMAGE, wmOperatorType::invoke, ot, wmOperatorType::poll, screenshot_cancel(), screenshot_check(), screenshot_draw(), screenshot_exec(), screenshot_invoke(), screenshot_poll(), wmOperatorType::ui, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by SCREEN_OT_screenshot(), and SCREEN_OT_screenshot_area().
|
static |
Definition at line 188 of file screendump.c.
References screenshot_data_free().
Referenced by screen_screenshot_impl().
|
static |
Definition at line 182 of file screendump.c.
References wmOperator::customdata, ScreenshotData::im_format, and WM_operator_filesel_ensure_ext_imtype().
Referenced by screen_screenshot_impl().
|
static |
Definition at line 53 of file screendump.c.
References blender::compositor::area(), BKE_image_format_init(), C, ScreenshotData::crop, CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, ScreenshotData::dumprect, ScreenshotData::dumpsx, ScreenshotData::dumpsy, ScreenshotData::im_format, MEM_callocN, NULL, WM_redraw_windows(), and WM_window_pixels_read().
Referenced by screenshot_exec(), and screenshot_invoke().
|
static |
Definition at line 85 of file screendump.c.
References wmOperator::customdata, ScreenshotData::dumprect, MEM_freeN, and NULL.
Referenced by screenshot_cancel(), and screenshot_exec().
|
static |
Definition at line 202 of file screendump.c.
References wmOperator::customdata, ScreenshotData::im_format, wmOperator::layout, NULL, wmOperator::ptr, ptr, RNA_pointer_create(), screenshot_draw_check_prop(), UI_BUT_LABEL_ALIGN_NONE, uiDefAutoButsRNA(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uiTemplateImageSettings().
Referenced by screen_screenshot_impl().
|
static |
Definition at line 193 of file screendump.c.
References RNA_property_identifier(), and STREQ.
Referenced by screenshot_draw().
|
static |
Definition at line 98 of file screendump.c.
References BKE_imbuf_write(), BKE_main_blendfile_path_from_global(), BKE_reportf(), BLI_path_abs(), C, ScreenshotData::crop, CTX_wm_area(), wmOperator::customdata, ScreenshotData::dumprect, ScreenshotData::dumpsx, ScreenshotData::dumpsy, FILE_MAX, wmOperator::idname, ScreenshotData::im_format, IMB_allocImBuf(), IMB_color_to_bw(), IMB_freeImBuf(), IMB_rect_crop(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, ImageFormatData::planes, wmOperator::ptr, R_IMF_PLANES_BW, ImBuf::rect, wmOperator::reports, RNA_string_get(), RPT_ERROR, screenshot_data_create(), screenshot_data_free(), and STREQ.
Referenced by screen_screenshot_impl(), and screenshot_invoke().
|
static |
Definition at line 148 of file screendump.c.
References blender::compositor::area(), BKE_main_blendfile_path_from_global(), BKE_screen_find_area_xy(), BLI_path_extension_replace(), BLI_strncpy(), C, CTX_wm_area(), CTX_wm_screen(), FILE_MAX, wmOperator::idname, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), screenshot_data_create(), screenshot_exec(), SPACE_TYPE_ANY, STREQ, WM_event_add_fileselect(), and wmEvent::xy.
Referenced by screen_screenshot_impl().
Definition at line 220 of file screendump.c.
References C, G, and WM_operator_winactive().
Referenced by screen_screenshot_impl().