NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
wdata.c File Reference

Sidebar Window data. More...

#include "config.h"
#include <stddef.h>
#include "private.h"
#include "mutt/lib.h"
#include "gui/lib.h"
+ Include dependency graph for wdata.c:

Go to the source code of this file.

Functions

struct SidebarWindowDatasb_wdata_new (struct IndexSharedData *shared)
 Create new Window data for the Sidebar. More...
 
void sb_wdata_free (struct MuttWindow *win, void **ptr)
 Free Sidebar Window data - Implements MuttWindow::wdata_free() -. More...
 
struct SidebarWindowDatasb_wdata_get (struct MuttWindow *win)
 Get the Sidebar data for this window. More...
 

Detailed Description

Sidebar Window data.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file wdata.c.

Function Documentation

◆ sb_wdata_new()

struct SidebarWindowData* sb_wdata_new ( struct IndexSharedData shared)

Create new Window data for the Sidebar.

Return values
ptrNew Window data

Definition at line 41 of file wdata.c.

42 {
43  struct SidebarWindowData *wdata = mutt_mem_calloc(1, sizeof(struct SidebarWindowData));
44  wdata->shared = shared;
45  ARRAY_INIT(&wdata->entries);
46  return wdata;
47 }
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
Sidebar private Window data -.
Definition: private.h:62
struct IndexSharedData * shared
Definition: private.h:64
void * wdata
Private data.
Definition: mutt_window.h:145
#define ARRAY_INIT(head)
Initialize an array.
Definition: array.h:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sb_wdata_get()

struct SidebarWindowData* sb_wdata_get ( struct MuttWindow win)

Get the Sidebar data for this window.

Parameters
winWindow

Definition at line 70 of file wdata.c.

71 {
72  if (!win || (win->type != WT_SIDEBAR))
73  return NULL;
74 
75  return win->wdata;
76 }
Side panel containing Accounts or groups of data.
Definition: mutt_window.h:101
void * wdata
Private data.
Definition: mutt_window.h:145
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:144
+ Here is the caller graph for this function: