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

Private Index Functions. More...

#include <stdbool.h>
+ Include dependency graph for private.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct MuttWindowindex_window_new (struct IndexSharedData *shared, struct IndexPrivateData *priv)
 Create a new Index Window (list of Emails) More...
 
struct MuttWindowipanel_new (bool status_on_top, struct IndexSharedData *shared)
 Create the Windows for the Index panel. More...
 

Detailed Description

Private Index Functions.

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 private.h.

Function Documentation

◆ index_window_new()

struct MuttWindow* index_window_new ( struct IndexSharedData shared,
struct IndexPrivateData priv 
)

Create a new Index Window (list of Emails)

Return values
ptrNew Window

Definition at line 416 of file index.c.

418 {
420 
421  struct Menu *menu = win->wdata;
422  menu->mdata = priv;
423  priv->menu = menu;
424 
432 
433  return win;
434 }
Definition: lib.h:67
struct Menu * menu
Menu controlling the index.
Definition: private_data.h:44
Attachment command changed, NotifyAttach.
Definition: notify_type.h:37
Subject Regex has changed, NotifySubjRx.
Definition: notify_type.h:52
Alternates command changed, NotifyAlternates.
Definition: notify_type.h:36
static int index_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t.
Definition: index.c:249
Container for Accounts, Notifications.
Definition: neomutt.h:36
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:53
static int index_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t.
Definition: index.c:387
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:76
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
static int index_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t.
Definition: index.c:303
Colour has changed, NotifyColor, EventColor.
Definition: notify_type.h:39
void * mdata
Private data.
Definition: lib.h:155
Index panel (list of emails)
Definition: type.h:50
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:42
static int index_attach_observer(struct NotifyCallback *nc)
Notification that an &#39;attachments&#39; command has occurred - Implements observer_t.
Definition: index.c:233
Email scoring has changed.
Definition: notify_type.h:51
static int index_altern_observer(struct NotifyCallback *nc)
Notification that an &#39;alternates&#39; command has occurred - Implements observer_t.
Definition: index.c:217
static int index_subjrx_observer(struct NotifyCallback *nc)
Notification that a &#39;subjectrx&#39; command has occurred - Implements observer_t.
Definition: index.c:371
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
void * wdata
Private data.
Definition: mutt_window.h:145
static int index_score_observer(struct NotifyCallback *nc)
Notification that a &#39;score&#39; command has occurred - Implements observer_t.
Definition: index.c:342
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ipanel_new()

struct MuttWindow* ipanel_new ( bool  status_on_top,
struct IndexSharedData shared 
)

Create the Windows for the Index panel.

Parameters
status_on_toptrue, if the Index bar should be on top
sharedShared Index data
Return values
ptrNew Index Panel

Definition at line 120 of file ipanel.c.

121 {
122  struct MuttWindow *panel_index =
125 
126  struct IndexPrivateData *priv = index_private_data_new(shared);
127  panel_index->wdata = priv;
128  panel_index->wdata_free = index_private_data_free;
129 
130  struct MuttWindow *win_index = index_window_new(shared, priv);
131  panel_index->focus = win_index;
132 
133  struct MuttWindow *win_ibar = ibar_new(panel_index, shared, priv);
134  if (status_on_top)
135  {
136  mutt_window_add_child(panel_index, win_ibar);
137  mutt_window_add_child(panel_index, win_index);
138  }
139  else
140  {
141  mutt_window_add_child(panel_index, win_index);
142  mutt_window_add_child(panel_index, win_ibar);
143  }
144 
146  notify_observer_add(panel_index->notify, NT_WINDOW, ipanel_window_observer, panel_index);
147 
148  return panel_index;
149 }
void(* wdata_free)(struct MuttWindow *win, void **ptr)
Definition: mutt_window.h:160
Private state data for the Index.
Definition: private_data.h:34
Window uses all available vertical space.
Definition: mutt_window.h:38
struct MuttWindow * index_window_new(struct IndexSharedData *shared, struct IndexPrivateData *priv)
Create a new Index Window (list of Emails)
Definition: index.c:416
Container for Accounts, Notifications.
Definition: neomutt.h:36
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:53
A panel containing the Index Window.
Definition: mutt_window.h:97
struct MuttWindow * focus
Focussed Window.
Definition: mutt_window.h:140
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
void index_private_data_free(struct MuttWindow *win, void **ptr)
Free Index Data.
Definition: private_data.c:38
struct IndexPrivateData * index_private_data_new(struct IndexSharedData *shared)
Create new Index Data.
Definition: private_data.c:52
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition: mutt_window.h:52
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
Definition: mutt_window.c:468
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:42
static int ipanel_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t.
Definition: ipanel.c:74
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
Definition: mutt_window.c:180
Window wants as much space as possible.
Definition: mutt_window.h:48
struct MuttWindow * ibar_new(struct MuttWindow *parent, struct IndexSharedData *shared, struct IndexPrivateData *priv)
Create the Index Bar (status)
Definition: ibar.c:333
void * wdata
Private data.
Definition: mutt_window.h:145
static int ipanel_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t.
Definition: ipanel.c:94
+ Here is the call graph for this function:
+ Here is the caller graph for this function: