Blender  V3.3
clip_toolbar.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. All rights reserved. */
3 
8 #include <string.h>
9 
10 #include "MEM_guardedalloc.h"
11 
12 #include "BLI_blenlib.h"
13 #include "BLI_utildefines.h"
14 
15 #include "BKE_context.h"
16 #include "BKE_screen.h"
17 
18 #include "WM_types.h"
19 
20 #include "ED_screen.h"
21 
22 #include "clip_intern.h" /* own include */
23 
24 /* ************************ header area region *********************** */
25 
26 /************************** properties ******************************/
27 
29 {
30  ARegion *region, *arnew;
31 
33  if (region) {
34  return region;
35  }
36 
37  /* add subdiv level; after header */
39 
40  /* is error! */
41  if (region == NULL) {
42  return NULL;
43  }
44 
45  arnew = MEM_callocN(sizeof(ARegion), "clip properties region");
46 
47  BLI_insertlinkafter(&area->regionbase, region, arnew);
48  arnew->regiontype = RGN_TYPE_UI;
49  arnew->alignment = RGN_ALIGN_RIGHT;
50 
51  arnew->flag = RGN_FLAG_HIDDEN;
52 
53  return arnew;
54 }
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
Definition: listbase.c:301
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_UI
@ RGN_TYPE_HEADER
@ RGN_ALIGN_RIGHT
Read Guarded memory(de)allocation.
ARegion * ED_clip_has_properties_region(ScrArea *area)
Definition: clip_toolbar.c:28
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
static void area(int d1, int d2, int e1, int e2, float weights[2])
short alignment
short regiontype