NeoMutt  2024-12-12-19-ge4b57e
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
private_data.h File Reference

Private state data for the Pager. More...

#include "config.h"
#include <regex.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include "lib.h"
#include "color/lib.h"
+ Include dependency graph for private_data.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PagerPrivateData
 Private state data for the Pager. More...
 

Functions

void pager_private_data_free (struct MuttWindow *win, void **ptr)
 Free Pager Data.
 
struct PagerPrivateDatapager_private_data_new (void)
 Create new Pager Data.
 

Detailed Description

Private state data for the Pager.

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

Function Documentation

◆ pager_private_data_free()

void pager_private_data_free ( struct MuttWindow win,
void **  ptr 
)

Free Pager Data.

Parameters
winWindow
ptrPager Data to free

Definition at line 39 of file private_data.c.

40{
41 if (!ptr || !*ptr)
42 return;
43
44 struct PagerPrivateData *priv = *ptr;
45
46 mutt_debug(LL_NOTIFY, "NT_PAGER_DELETE: %p\n", (void *) priv);
48 notify_free(&priv->notify);
49
51
52 FREE(ptr);
53}
void attr_color_list_clear(struct AttrColorList *acl)
Free the contents of an AttrColorList.
Definition: attr.c:117
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
@ LL_NOTIFY
Log of notifications.
Definition: logging2.h:48
#define FREE(x)
Definition: memory.h:55
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:173
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition: notify.c:75
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition: notify_type.h:53
#define NT_PAGER_DELETE
Pager Private Data is about to be freed.
Definition: lib.h:186
Private state data for the Pager.
Definition: private_data.h:41
struct Notify * notify
Notifications: NotifyPager, PagerPrivateData.
Definition: private_data.h:71
struct AttrColorList ansi_list
List of ANSI colours used in the Pager.
Definition: private_data.h:70
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pager_private_data_new()

struct PagerPrivateData * pager_private_data_new ( void  )

Create new Pager Data.

Return values
ptrNew PagerPrivateData

Definition at line 59 of file private_data.c.

60{
61 struct PagerPrivateData *priv = MUTT_MEM_CALLOC(1, struct PagerPrivateData);
62
63 priv->notify = notify_new();
64
65 // TODO initialize fields
66
67 TAILQ_INIT(&priv->ansi_list);
68
69 return priv;
70}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
struct Notify * notify_new(void)
Create a new notifications handler.
Definition: notify.c:62
#define TAILQ_INIT(head)
Definition: queue.h:783
+ Here is the call graph for this function:
+ Here is the caller graph for this function: