Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:58

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright 2019 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  */
0020 
0021 #ifndef __G_MEMORY_MONITOR_H__
0022 #define __G_MEMORY_MONITOR_H__
0023 
0024 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0025 #error "Only <gio/gio.h> can be included directly."
0026 #endif
0027 
0028 #include <gio/giotypes.h>
0029 
0030 G_BEGIN_DECLS
0031 
0032 /**
0033  * G_MEMORY_MONITOR_EXTENSION_POINT_NAME:
0034  *
0035  * Extension point for memory usage monitoring functionality.
0036  * See [Extending GIO][extending-gio].
0037  *
0038  * Since: 2.64
0039  */
0040 #define G_MEMORY_MONITOR_EXTENSION_POINT_NAME "gio-memory-monitor"
0041 
0042 #define G_TYPE_MEMORY_MONITOR             (g_memory_monitor_get_type ())
0043 GIO_AVAILABLE_IN_2_64
0044 G_DECLARE_INTERFACE(GMemoryMonitor, g_memory_monitor, g, memory_monitor, GObject)
0045 
0046 #define G_MEMORY_MONITOR(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_MONITOR, GMemoryMonitor))
0047 #define G_IS_MEMORY_MONITOR(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_MONITOR))
0048 #define G_MEMORY_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_MEMORY_MONITOR, GMemoryMonitorInterface))
0049 
0050 struct _GMemoryMonitorInterface {
0051   /*< private >*/
0052   GTypeInterface g_iface;
0053 
0054   /*< public >*/
0055   void     (*low_memory_warning)  (GMemoryMonitor             *monitor,
0056                                    GMemoryMonitorWarningLevel  level);
0057 };
0058 
0059 GIO_AVAILABLE_IN_2_64
0060 GMemoryMonitor      *g_memory_monitor_dup_default           (void);
0061 
0062 G_END_DECLS
0063 
0064 #endif /* __G_MEMORY_MONITOR_H__ */