Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/space_info.c
| Show All 22 Lines | |||||
| #include "WM_message.h" | #include "WM_message.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| #include "BLO_read_write.h" | |||||
| #include "info_intern.h" /* own include */ | #include "info_intern.h" /* own include */ | ||||
| /* ******************** default callbacks for info space ***************** */ | /* ******************** default callbacks for info space ***************** */ | ||||
| static SpaceLink *info_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) | static SpaceLink *info_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) | ||||
| { | { | ||||
| ARegion *region; | ARegion *region; | ||||
| SpaceInfo *sinfo; | SpaceInfo *sinfo; | ||||
| ▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | static void info_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params) | ||||
| msg_sub_value_region_tag_redraw.owner = region; | msg_sub_value_region_tag_redraw.owner = region; | ||||
| msg_sub_value_region_tag_redraw.user_data = region; | msg_sub_value_region_tag_redraw.user_data = region; | ||||
| msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw; | msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw; | ||||
| WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | ||||
| WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); | ||||
| } | } | ||||
| static void info_blend_write(BlendWriter *writer, SpaceLink *sl) | |||||
| { | |||||
| BLO_write_struct(writer, SpaceInfo, sl); | |||||
| } | |||||
| void ED_spacetype_info(void) | void ED_spacetype_info(void) | ||||
| { | { | ||||
| SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype info"); | SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype info"); | ||||
| ARegionType *art; | ARegionType *art; | ||||
| st->spaceid = SPACE_INFO; | st->spaceid = SPACE_INFO; | ||||
| STRNCPY(st->name, "Info"); | STRNCPY(st->name, "Info"); | ||||
| st->create = info_create; | st->create = info_create; | ||||
| st->free = info_free; | st->free = info_free; | ||||
| st->init = info_init; | st->init = info_init; | ||||
| st->duplicate = info_duplicate; | st->duplicate = info_duplicate; | ||||
| st->operatortypes = info_operatortypes; | st->operatortypes = info_operatortypes; | ||||
| st->keymap = info_keymap; | st->keymap = info_keymap; | ||||
| st->blend_write = info_blend_write; | |||||
| /* regions: main window */ | /* regions: main window */ | ||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype info region"); | art = MEM_callocN(sizeof(ARegionType), "spacetype info region"); | ||||
| art->regionid = RGN_TYPE_WINDOW; | art->regionid = RGN_TYPE_WINDOW; | ||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | ||||
| art->init = info_main_region_init; | art->init = info_main_region_init; | ||||
| art->draw = info_main_region_draw; | art->draw = info_main_region_draw; | ||||
| Show All 19 Lines | |||||