# session_group_contains

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L505
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-session_group_contains/

```c
struct session_group * session_group_contains(struct session *target)
```

## Parameters

- `target` (`struct session *`)

## Called by

- [`cmd_new_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-new-session.c#L132)
- [`cmd_swap_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-swap-window-c-cmd_swap_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-swap-window.c#L56)
- [`format_cb_session_group_attached_list`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group_attached_list/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L993)
- [`format_cb_session_group_list`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group_list/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L960)
- [`format_cb_session_grouped`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_grouped/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L2019)
- [`server_link_window`](/en/tmux/3.2a/reference/c-function-server_link_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L251)
- [`session_group_add`](/en/tmux/3.2a/reference/c-function-session_group_add/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L550)
- [`window_tree_build`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L462)

## Referenced by

- [`format_cb_session_group`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group/) (function)
- [`format_cb_session_group_attached`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group_attached/) (function)
- [`format_cb_session_group_many_attached`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group_many_attached/) (function)
- [`format_cb_session_group_size`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_session_group_size/) (function)
- [`server_destroy_session_group`](/en/tmux/3.2a/reference/c-function-server-fn-c-server_destroy_session_group/) (function)
- [`server_redraw_session_group`](/en/tmux/3.2a/reference/c-function-server_redraw_session_group/) (function)
- [`server_renumber_session`](/en/tmux/3.2a/reference/c-function-server_renumber_session/) (function)
- [`server_status_session_group`](/en/tmux/3.2a/reference/c-function-server_status_session_group/) (function)
- [`session_group_remove`](/en/tmux/3.2a/reference/c-function-session-c-session_group_remove/) (function)
- [`session_group_synchronize_from`](/en/tmux/3.2a/reference/c-function-session_group_synchronize_from/) (function)
- [`session_group_synchronize_to`](/en/tmux/3.2a/reference/c-function-session_group_synchronize_to/) (function)
- [`session_is_linked`](/en/tmux/3.2a/reference/c-function-session_is_linked/) (function)
- [`session_new`](/en/tmux/3.2a/reference/c-function-session_new/) (function)

## Referenced declarations

- [`session.gentry`](/en/tmux/3.2a/reference/c-struct-session-gentry/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`session_group`](/en/tmux/3.2a/reference/c-struct-session_group/) (struct)
- [`session_group.sessions`](/en/tmux/3.2a/reference/c-struct-session_group-sessions/) (attribute)
