41 area_region_from_regiondata(screen, rv3d, &
area, ®ion);
62 static void rna_SpaceTextEditor_region_location_from_cursor(
63 ID *
id,
SpaceText *st,
int line,
int column,
int r_pixel_pos[2])
69 const int cursor_co[2] = {line, column};
91 srna,
"cursor_location_from_region",
"rna_SpaceNodeEditor_cursor_location_from_region");
94 parm =
RNA_def_int(func,
"x", 0, INT_MIN, INT_MAX,
"x",
"Region x coordinate", -10000, 10000);
96 parm =
RNA_def_int(func,
"y", 0, INT_MIN, INT_MAX,
"y",
"Region y coordinate", -10000, 10000);
106 srna,
"region_location_from_cursor",
"rna_SpaceTextEditor_region_location_from_cursor");
108 func,
"Retrieve the region position from the given line and character position");
110 parm =
RNA_def_int(func,
"line", 0, INT_MIN, INT_MAX,
"Line",
"Line index", 0, INT_MAX);
112 parm =
RNA_def_int(func,
"column", 0, INT_MIN, INT_MAX,
"Column",
"Column index", 0, INT_MAX);
115 func,
"result", 2,
NULL, -1, INT_MAX,
"",
"Region coordinates", -1, INT_MAX);
124 func =
RNA_def_function(srna,
"activate_asset_by_id",
"ED_fileselect_activate_by_id");
136 "Whether to activate the ID immediately (false) or after the file browser refreshes (true)");
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct Depsgraph * BKE_scene_ensure_depsgraph(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ScrArea * BKE_screen_find_area_from_space(struct bScreen *screen, struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
struct Depsgraph Depsgraph
bool ED_text_region_location_from_cursor(struct SpaceText *st, struct ARegion *region, const int cursor_co[2], int r_pixel_co[2])
void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, struct ARegion *region, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect, bool offscreen)
const Depsgraph * depsgraph
static void area(int d1, int d2, int e1, int e2, float weights[2])
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_function_flag(FunctionRNA *func, int flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_api_region_view3d(StructRNA *srna)
void RNA_api_space_filebrowser(StructRNA *srna)
void RNA_api_space_node(StructRNA *srna)
void RNA_api_space_text(StructRNA *srna)
bScreen * WM_window_get_active_screen(const wmWindow *win)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)