Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_userpref/space_userpref.c
| Show All 21 Lines | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "BLO_read_write.h" | |||||
| /* ******************** default callbacks for userpref space ***************** */ | /* ******************** default callbacks for userpref space ***************** */ | ||||
| static SpaceLink *userpref_create(const ScrArea *area, const Scene *UNUSED(scene)) | static SpaceLink *userpref_create(const ScrArea *area, const Scene *UNUSED(scene)) | ||||
| { | { | ||||
| ARegion *region; | ARegion *region; | ||||
| SpaceUserPref *spref; | SpaceUserPref *spref; | ||||
| spref = MEM_callocN(sizeof(SpaceUserPref), "inituserpref"); | spref = MEM_callocN(sizeof(SpaceUserPref), "inituserpref"); | ||||
| ▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | |||||
| static void userpref_navigation_region_listener(const wmRegionListenerParams *UNUSED(params)) | static void userpref_navigation_region_listener(const wmRegionListenerParams *UNUSED(params)) | ||||
| { | { | ||||
| } | } | ||||
| static void userpref_execute_region_listener(const wmRegionListenerParams *UNUSED(params)) | static void userpref_execute_region_listener(const wmRegionListenerParams *UNUSED(params)) | ||||
| { | { | ||||
| } | } | ||||
| static void userpref_blend_write(BlendWriter *writer, SpaceLink *sl) | |||||
| { | |||||
| BLO_write_struct(writer, SpaceUserPref, sl); | |||||
| } | |||||
| void ED_spacetype_userpref(void) | void ED_spacetype_userpref(void) | ||||
| { | { | ||||
| SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype userpref"); | SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype userpref"); | ||||
| ARegionType *art; | ARegionType *art; | ||||
| st->spaceid = SPACE_USERPREF; | st->spaceid = SPACE_USERPREF; | ||||
| STRNCPY(st->name, "Userpref"); | STRNCPY(st->name, "Userpref"); | ||||
| st->create = userpref_create; | st->create = userpref_create; | ||||
| st->free = userpref_free; | st->free = userpref_free; | ||||
| st->init = userpref_init; | st->init = userpref_init; | ||||
| st->duplicate = userpref_duplicate; | st->duplicate = userpref_duplicate; | ||||
| st->operatortypes = userpref_operatortypes; | st->operatortypes = userpref_operatortypes; | ||||
| st->keymap = userpref_keymap; | st->keymap = userpref_keymap; | ||||
| st->blend_write = userpref_blend_write; | |||||
| /* regions: main window */ | /* regions: main window */ | ||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region"); | art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region"); | ||||
| art->regionid = RGN_TYPE_WINDOW; | art->regionid = RGN_TYPE_WINDOW; | ||||
| art->init = userpref_main_region_init; | art->init = userpref_main_region_init; | ||||
| art->layout = userpref_main_region_layout; | art->layout = userpref_main_region_layout; | ||||
| art->draw = ED_region_panels_draw; | art->draw = ED_region_panels_draw; | ||||
| art->listener = userpref_main_region_listener; | art->listener = userpref_main_region_listener; | ||||
| Show All 40 Lines | |||||