Blender V4.5
space_text.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstring>
10
11#include "DNA_text_types.h"
12
13#include "MEM_guardedalloc.h"
14
15#include "BLI_listbase.h"
16#include "BLI_string.h"
17
18#include "BKE_context.hh"
19#include "BKE_lib_query.hh"
20#include "BKE_lib_remap.hh"
21#include "BKE_screen.hh"
22
23#include "ED_screen.hh"
24#include "ED_space_api.hh"
25
26#include "WM_api.hh"
27#include "WM_types.hh"
28
29#include "UI_interface.hh"
30#include "UI_resources.hh"
31#include "UI_view2d.hh"
32
33#include "BLO_read_write.hh"
34
35#include "RNA_access.hh"
36#include "RNA_path.hh"
37
38#include "text_format.hh"
39#include "text_intern.hh" /* own include */
40
41/* ******************** default callbacks for text space ***************** */
42
43static SpaceLink *text_create(const ScrArea * /*area*/, const Scene * /*scene*/)
44{
45 ARegion *region;
46 SpaceText *stext;
47
48 stext = MEM_callocN<SpaceText>("inittext");
49 stext->spacetype = SPACE_TEXT;
50
51 stext->lheight = 12;
52 stext->tabnumber = 4;
53 stext->margin_column = 80;
54 stext->showsyntax = true;
55 stext->showlinenrs = true;
56 stext->flags |= ST_FIND_WRAP;
57
58 stext->runtime = MEM_new<SpaceText_Runtime>(__func__);
59
60 /* header */
61 region = BKE_area_region_new();
62
63 BLI_addtail(&stext->regionbase, region);
66
67 /* footer */
68 region = BKE_area_region_new();
69 BLI_addtail(&stext->regionbase, region);
72
73 /* properties region */
74 region = BKE_area_region_new();
75
76 BLI_addtail(&stext->regionbase, region);
77 region->regiontype = RGN_TYPE_UI;
78 region->alignment = RGN_ALIGN_RIGHT;
79 region->flag = RGN_FLAG_HIDDEN;
80
81 /* main region */
82 region = BKE_area_region_new();
83
84 BLI_addtail(&stext->regionbase, region);
86
87 return (SpaceLink *)stext;
88}
89
90/* Doesn't free the space-link itself. */
91static void text_free(SpaceLink *sl)
92{
93 SpaceText *stext = (SpaceText *)sl;
95 MEM_delete(stext->runtime);
96 stext->text = nullptr;
97}
98
99/* spacetype; init callback */
100static void text_init(wmWindowManager * /*wm*/, ScrArea * /*area*/) {}
101
103{
104 SpaceText *stextn = static_cast<SpaceText *>(MEM_dupallocN(sl));
105
106 /* Add its own runtime data. */
107 stextn->runtime = MEM_new<SpaceText_Runtime>(__func__);
108
109 return (SpaceLink *)stextn;
110}
111
113{
114 ScrArea *area = params->area;
115 const wmNotifier *wmn = params->notifier;
116 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
117
118 /* context changes */
119 switch (wmn->category) {
120 case NC_TEXT:
121 /* check if active text was changed, no need to redraw if text isn't active
122 * (reference == nullptr) means text was unlinked, should update anyway for this
123 * case -- no way to know was text active before unlinking or not */
124 if (wmn->reference && wmn->reference != st->text) {
125 break;
126 }
127
128 switch (wmn->data) {
129 case ND_DISPLAY:
130 case ND_CURSOR:
131 ED_area_tag_redraw(area);
132 break;
133 }
134
135 switch (wmn->action) {
136 case NA_EDITED:
137 if (st->text) {
140 }
141
142 ED_area_tag_redraw(area);
143 ATTR_FALLTHROUGH; /* fall down to tag redraw */
144 case NA_ADDED:
145 case NA_REMOVED:
146 case NA_SELECTED:
147 ED_area_tag_redraw(area);
148 break;
149 }
150
151 break;
152 case NC_SPACE:
153 if (wmn->data == ND_SPACE_TEXT) {
154 ED_area_tag_redraw(area);
155 }
156 break;
157 }
158}
159
161{
170
175
181
185
187
193
199
202
207
210
212
214
216
218}
219
220static void text_keymap(wmKeyConfig *keyconf)
221{
222 WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
224}
225
226const char *text_context_dir[] = {"edit_text", nullptr};
227
228static int /*eContextResult*/ text_context(const bContext *C,
229 const char *member,
231{
233
234 if (CTX_data_dir(member)) {
236 return CTX_RESULT_OK;
237 }
238 if (CTX_data_equals(member, "edit_text")) {
239 if (st->text != nullptr) {
241 }
242 return CTX_RESULT_OK;
243 }
244
246}
247
248/********************* main region ********************/
249
250/* add handlers, stuff you only do once or on area/region changes */
252{
253 wmKeyMap *keymap;
254 ListBase *lb;
255
256 UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
257
258 /* own keymap */
259 keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
260 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
262 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
263
264 /* add drop boxes */
266
267 WM_event_add_dropbox_handler(&region->runtime->handlers, lb);
268}
269
270static void text_main_region_draw(const bContext *C, ARegion *region)
271{
272 /* draw entirely, view changes should be handled here */
274 // View2D *v2d = &region->v2d;
275
276 /* clear and setup matrix */
278
279 // UI_view2d_view_ortho(v2d);
280
281 /* data... */
282 draw_text_main(st, region);
283
284 /* reset view matrix */
285 // UI_view2d_view_restore(C);
286
287 /* scrollers? */
288}
289
290static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
291{
292 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
293 int wmcursor = WM_CURSOR_TEXT_EDIT;
294
295 if (st->text && BLI_rcti_isect_pt(&st->runtime->scroll_region_handle,
296 win->eventstate->xy[0] - region->winrct.xmin,
297 st->runtime->scroll_region_handle.ymin))
298 {
299 wmcursor = WM_CURSOR_DEFAULT;
300 }
301
302 WM_cursor_set(win, wmcursor);
303}
304
305/* ************* dropboxes ************* */
306
307static bool text_drop_path_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
308{
309 if (drag->type == WM_DRAG_PATH) {
311 if (ELEM(file_type, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT)) {
312 return true;
313 }
314 }
315 return false;
316}
317
318static void text_drop_path_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
319{
320 /* copy drag path to properties */
321 RNA_string_set(drop->ptr, "filepath", WM_drag_get_single_path(drag));
322}
323
324static bool text_drop_id_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
325{
326 return (drag->type == WM_DRAG_ID);
327}
328
329static void text_drop_id_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
330{
331 ID *id = WM_drag_get_local_ID(drag, 0);
332
333 /* copy drag path to properties */
334 std::string text = RNA_path_full_ID_py(id);
335 RNA_string_set(drop->ptr, "text", text.c_str());
336}
337
338static bool text_drop_string_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
339{
340 return (drag->type == WM_DRAG_STRING);
341}
342
343static void text_drop_string_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
344{
345 const std::string &str = WM_drag_get_string(drag);
346 RNA_string_set(drop->ptr, "text", str.c_str());
347}
348
349/* this region dropbox definition */
350static void text_dropboxes()
351{
353
354 WM_dropbox_add(lb, "TEXT_OT_open", text_drop_path_poll, text_drop_path_copy, nullptr, nullptr);
355 WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_id_poll, text_drop_id_copy, nullptr, nullptr);
357 lb, "TEXT_OT_insert", text_drop_string_poll, text_drop_string_copy, nullptr, nullptr);
358}
359
360/* ************* end drop *********** */
361
362/****************** header region ******************/
363
364/* add handlers, stuff you only do once or on area/region changes */
365static void text_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
366{
367 ED_region_header_init(region);
368}
369
370static void text_header_region_draw(const bContext *C, ARegion *region)
371{
372 ED_region_header(C, region);
373}
374
375/****************** properties region ******************/
376
377/* add handlers, stuff you only do once or on area/region changes */
379{
380 wmKeyMap *keymap;
381
383 ED_region_panels_init(wm, region);
384
385 /* own keymaps */
386 keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
387 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
388}
389
390static void text_properties_region_draw(const bContext *C, ARegion *region)
391{
392 ED_region_panels(C, region);
393}
394
395static void text_id_remap(ScrArea * /*area*/,
396 SpaceLink *slink,
397 const blender::bke::id::IDRemapper &mappings)
398{
399 SpaceText *stext = (SpaceText *)slink;
400 mappings.apply(reinterpret_cast<ID **>(&stext->text), ID_REMAP_APPLY_ENSURE_REAL);
401}
402
404{
405 SpaceText *st = reinterpret_cast<SpaceText *>(space_link);
408}
409
411{
412 SpaceText *st = (SpaceText *)sl;
413 st->runtime = MEM_new<SpaceText_Runtime>(__func__);
414}
415
417{
418 BLO_write_struct(writer, SpaceText, sl);
419}
420
421/********************* registration ********************/
422
424{
425 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
426 ARegionType *art;
427
428 st->spaceid = SPACE_TEXT;
429 STRNCPY(st->name, "Text");
430
431 st->create = text_create;
432 st->free = text_free;
433 st->init = text_init;
434 st->duplicate = text_duplicate;
435 st->operatortypes = text_operatortypes;
436 st->keymap = text_keymap;
437 st->listener = text_listener;
438 st->context = text_context;
439 st->dropboxes = text_dropboxes;
440 st->id_remap = text_id_remap;
441 st->foreach_id = text_foreach_id;
442 st->blend_read_data = text_space_blend_read_data;
443 st->blend_read_after_liblink = nullptr;
444 st->blend_write = text_space_blend_write;
445
446 /* regions: main window */
447 art = MEM_callocN<ARegionType>("spacetype text region");
451 art->cursor = text_cursor;
452 art->event_cursor = true;
453
454 BLI_addhead(&st->regiontypes, art);
455
456 /* regions: properties */
457 art = MEM_callocN<ARegionType>("spacetype text region");
458 art->regionid = RGN_TYPE_UI;
461
464 BLI_addhead(&st->regiontypes, art);
465
466 /* regions: header */
467 art = MEM_callocN<ARegionType>("spacetype text region");
469 art->prefsizey = HEADERY;
471
474 BLI_addhead(&st->regiontypes, art);
475
476 /* regions: footer */
477 art = MEM_callocN<ARegionType>("spacetype text region");
479 art->prefsizey = HEADERY;
483 BLI_addhead(&st->regiontypes, art);
484
485 BKE_spacetype_register(std::move(st));
486
487 /* Register formatters.
488 * The first registered formatter is default when there is no extension in the ID-name. */
489 ED_text_format_register_py(); /* Keep first (default formatter). */
494}
SpaceText * CTX_wm_space_text(const bContext *C)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool CTX_data_equals(const char *member, const char *str)
bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
@ CTX_RESULT_MEMBER_NOT_FOUND
@ CTX_RESULT_OK
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_USER_ONE
@ IDWALK_CB_DIRECT_WEAK_LINK
@ ID_REMAP_APPLY_ENSURE_REAL
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:276
ARegion * BKE_area_region_new()
Definition screen.cc:381
#define ATTR_FALLTHROUGH
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:91
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:688
#define ELEM(...)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define HEADERY
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
eFileSel_File_Types
@ FILE_TYPE_TEXT
@ FILE_TYPE_PYSCRIPT
@ SPACE_TEXT
@ ST_FIND_WRAP
@ USER_HEADER_BOTTOM
@ V2D_SCROLL_VERTICAL_HIDE
@ V2D_SCROLL_RIGHT
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:714
void ED_region_panels(const bContext *C, ARegion *region)
Definition area.cc:3462
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:3750
void ED_region_header_init(ARegion *region)
Definition area.cc:3765
@ ED_KEYMAP_UI
Definition ED_screen.hh:740
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:746
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:743
@ ED_KEYMAP_FOOTER
Definition ED_screen.hh:747
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:3469
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
#define UI_COMPACT_PANEL_WIDTH
@ TH_BACK
void UI_ThemeClearColor(int colorid)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
Definition view2d.cc:221
@ V2D_COMMONVIEW_STANDARD
Definition UI_view2d.hh:33
#define ND_CURSOR
Definition WM_types.hh:487
#define ND_DISPLAY
Definition WM_types.hh:488
#define NA_ADDED
Definition WM_types.hh:583
#define NA_EDITED
Definition WM_types.hh:581
#define NC_TEXT
Definition WM_types.hh:383
#define NA_REMOVED
Definition WM_types.hh:584
@ WM_DRAG_PATH
Definition WM_types.hh:1205
@ WM_DRAG_STRING
Definition WM_types.hh:1214
@ WM_DRAG_ID
Definition WM_types.hh:1198
#define ND_SPACE_TEXT
Definition WM_types.hh:527
#define NC_SPACE
Definition WM_types.hh:389
#define NA_SELECTED
Definition WM_types.hh:586
#define U
BMesh const char void * data
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
static void text_update_edited(bContext *C, Object *obedit, const eEditFontMode mode)
Definition editfont.cc:405
#define str(s)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void * MEM_dupallocN(const void *vmemh)
Definition mallocn.cc:143
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
std::string RNA_path_full_ID_py(ID *id)
Definition rna_path.cc:1232
const char * text_context_dir[]
static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
static void text_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void text_header_region_draw(const bContext *C, ARegion *region)
static void text_header_region_init(wmWindowManager *, ARegion *region)
static SpaceLink * text_create(const ScrArea *, const Scene *)
Definition space_text.cc:43
static void text_free(SpaceLink *sl)
Definition space_text.cc:91
static void text_drop_id_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_keymap(wmKeyConfig *keyconf)
static void text_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void text_properties_region_init(wmWindowManager *wm, ARegion *region)
static void text_operatortypes()
static void text_main_region_init(wmWindowManager *wm, ARegion *region)
static bool text_drop_string_poll(bContext *, wmDrag *drag, const wmEvent *)
void ED_spacetype_text()
static void text_dropboxes()
static SpaceLink * text_duplicate(SpaceLink *sl)
static void text_properties_region_draw(const bContext *C, ARegion *region)
static void text_drop_path_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_main_region_draw(const bContext *C, ARegion *region)
static bool text_drop_id_poll(bContext *, wmDrag *drag, const wmEvent *)
static void text_listener(const wmSpaceTypeListenerParams *params)
static void text_drop_string_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static void text_init(wmWindowManager *, ScrArea *)
static void text_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static int text_context(const bContext *C, const char *member, bContextDataResult *result)
static bool text_drop_path_poll(bContext *, wmDrag *drag, const wmEvent *)
void(* cursor)(wmWindow *win, ScrArea *area, ARegion *region)
void(* draw)(const bContext *C, ARegion *region)
short event_cursor
void(* init)(wmWindowManager *wm, ARegion *region)
ARegionRuntimeHandle * runtime
Definition DNA_ID.h:404
void * first
ListBase spacedata
ListBase regionbase
SpaceText_Runtime * runtime
short margin_column
struct Text * text
int xmin
eWM_DragDataType type
Definition WM_types.hh:1327
PointerRNA * ptr
Definition WM_types.hh:1415
int xy[2]
Definition WM_types.hh:758
unsigned int data
Definition WM_types.hh:355
unsigned int action
Definition WM_types.hh:355
unsigned int category
Definition WM_types.hh:355
void * reference
Definition WM_types.hh:357
struct wmKeyConfig * defaultconf
struct wmEvent * eventstate
void TEXT_OT_autocomplete(wmOperatorType *ot)
void space_text_drawcache_tag_update(SpaceText *st, const bool full)
Definition text_draw.cc:734
void space_text_free_caches(SpaceText *st)
Definition text_draw.cc:783
void draw_text_main(SpaceText *st, ARegion *region)
void ED_text_format_register_pov()
void ED_text_format_register_pov_ini()
void ED_text_format_register_glsl()
void ED_text_format_register_osl()
void ED_text_format_register_py()
void TEXT_OT_start_find(wmOperatorType *ot)
void TEXT_OT_replace_set_selected(wmOperatorType *ot)
Definition text_ops.cc:3950
void TEXT_OT_unlink(wmOperatorType *ot)
Definition text_ops.cc:626
void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
Definition text_ops.cc:2589
void TEXT_OT_reload(wmOperatorType *ot)
Definition text_ops.cc:564
void TEXT_OT_open(wmOperatorType *ot)
Definition text_ops.cc:474
void TEXT_OT_update_shader(wmOperatorType *ot)
Definition text_ops.cc:4390
void TEXT_OT_replace(wmOperatorType *ot)
Definition text_ops.cc:3876
void TEXT_OT_run_script(wmOperatorType *ot)
Definition text_ops.cc:917
void TEXT_OT_copy(wmOperatorType *ot)
Definition text_ops.cc:1076
void TEXT_OT_select_line(wmOperatorType *ot)
Definition text_ops.cc:1602
void TEXT_OT_new(wmOperatorType *ot)
Definition text_ops.cc:377
void TEXT_OT_indent_or_autocomplete(wmOperatorType *ot)
Definition text_ops.cc:1152
void TEXT_OT_scroll(wmOperatorType *ot)
Definition text_ops.cc:2882
void TEXT_OT_line_break(wmOperatorType *ot)
Definition text_ops.cc:1296
void TEXT_OT_save_as(wmOperatorType *ot)
Definition text_ops.cc:837
void TEXT_OT_paste(wmOperatorType *ot)
Definition text_ops.cc:982
void TEXT_OT_make_internal(wmOperatorType *ot)
Definition text_ops.cc:662
void TEXT_OT_to_3d_object(wmOperatorType *ot)
Definition text_ops.cc:4275
void TEXT_OT_indent(wmOperatorType *ot)
Definition text_ops.cc:1198
void TEXT_OT_select_all(wmOperatorType *ot)
Definition text_ops.cc:1570
void TEXT_OT_select_word(wmOperatorType *ot)
Definition text_ops.cc:1635
void TEXT_OT_save(wmOperatorType *ot)
Definition text_ops.cc:766
void TEXT_OT_move_lines(wmOperatorType *ot)
Definition text_ops.cc:1673
void TEXT_OT_cursor_set(wmOperatorType *ot)
Definition text_ops.cc:3442
void TEXT_OT_scroll_bar(wmOperatorType *ot)
Definition text_ops.cc:2992
void TEXT_OT_find(wmOperatorType *ot)
Definition text_ops.cc:3807
void TEXT_OT_duplicate_line(wmOperatorType *ot)
Definition text_ops.cc:1030
void TEXT_OT_move_select(wmOperatorType *ot)
Definition text_ops.cc:2370
void TEXT_OT_jump(wmOperatorType *ot)
Definition text_ops.cc:2425
void TEXT_OT_delete(wmOperatorType *ot)
Definition text_ops.cc:2547
void TEXT_OT_selection_set(wmOperatorType *ot)
Definition text_ops.cc:3393
void TEXT_OT_find_set_selected(wmOperatorType *ot)
Definition text_ops.cc:3919
void TEXT_OT_unindent(wmOperatorType *ot)
Definition text_ops.cc:1239
void TEXT_OT_insert(wmOperatorType *ot)
Definition text_ops.cc:3696
void TEXT_OT_comment_toggle(wmOperatorType *ot)
Definition text_ops.cc:1354
void TEXT_OT_jump_to_file_at_point(wmOperatorType *ot)
Definition text_ops.cc:4098
void TEXT_OT_resolve_conflict(wmOperatorType *ot)
Definition text_ops.cc:4238
void TEXT_OT_move(wmOperatorType *ot)
Definition text_ops.cc:2342
void TEXT_OT_line_number(wmOperatorType *ot)
Definition text_ops.cc:3512
void TEXT_OT_convert_whitespace(wmOperatorType *ot)
Definition text_ops.cc:1527
void TEXT_OT_cut(wmOperatorType *ot)
Definition text_ops.cc:1117
void WM_cursor_set(wmWindow *win, int curs)
@ WM_CURSOR_DEFAULT
Definition wm_cursors.hh:15
@ WM_CURSOR_TEXT_EDIT
Definition wm_cursors.hh:16
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *C, wmDrag *drag, const wmEvent *event), void(*copy)(bContext *C, wmDrag *drag, wmDropBox *drop), void(*cancel)(Main *bmain, wmDrag *drag, wmDropBox *drop), WMDropboxTooltipFunc tooltip)
const std::string & WM_drag_get_string(const wmDrag *drag)
int WM_drag_get_path_file_type(const wmDrag *drag)
const char * WM_drag_get_single_path(const wmDrag *drag)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
ID * WM_drag_get_local_ID(const wmDrag *drag, short idcode)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:893
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))