diff options
author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 00:35:53 -0300 |
---|---|---|
committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 00:35:53 -0300 |
commit | 5f01c706267c595de92406a32e7f31ef5056c2d0 (patch) | |
tree | d1e74ef54efc41ada622900fe3e2a50dee44a237 /includes/computer.h | |
parent | 09fcc751ef158898c315ebc9299a0fa3a722d914 (diff) |
New upstream version 2.0.3preupstream/2.0.3pre
Diffstat (limited to 'includes/computer.h')
-rw-r--r-- | includes/computer.h | 64 |
1 files changed, 49 insertions, 15 deletions
diff --git a/includes/computer.h b/includes/computer.h index 5a69a171..f8589d77 100644 --- a/includes/computer.h +++ b/includes/computer.h @@ -1,10 +1,10 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@hardinfo.org> + * Copyright (C) 2003-2007 L. A. F. Pereira <l@tia.mat.br> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. + * the Free Software Foundation, version 2 or later. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,6 +19,7 @@ #define __COMPUTER_H__ #include "hardinfo.h" +#include "x_util.h" typedef struct _Computer Computer; typedef struct _OperatingSystem OperatingSystem; @@ -26,6 +27,7 @@ typedef struct _MemoryInfo MemoryInfo; typedef struct _UptimeInfo UptimeInfo; typedef struct _LoadInfo LoadInfo; typedef struct _DisplayInfo DisplayInfo; +typedef struct _Distro Distro; typedef struct _AlsaInfo AlsaInfo; typedef struct _AlsaCard AlsaCard; @@ -36,14 +38,14 @@ typedef struct _FileSystemEntry FileSystemEntry; struct _AlsaCard { gchar *alsa_name; gchar *friendly_name; -/* +/* gchar *board; gchar revision, compat_class; gint subsys_vendorid, subsys_id; - + gint cap_dac_res, cap_adc_res; gboolean cap_3d_enh; - + gint curr_mic_gain; gboolean curr_3d_enh, curr_loudness, @@ -57,14 +59,18 @@ struct _AlsaInfo { }; struct _DisplayInfo { - gchar *ogl_vendor, *ogl_renderer, *ogl_version; - gboolean dri; - - gchar *display_name, *vendor, *version; - gchar *extensions; - gchar *monitors; - + /* old stuff */ gint width, height; + + /* new stuff */ + xinfo *xi; /* x info */ + wl_info *wl; /* wayland info */ + + gchar *display_server; + + /* don't free */ + const gchar *vendor; /* X vendor; points to xrr->xi->vendor */ + const gchar *session_type; /* points to wl->xdg_session_type */ }; struct _LoadInfo { @@ -84,10 +90,15 @@ struct _Computer { gchar *date_time; }; +#include "distro_flavors.h" + struct _OperatingSystem { gchar *kernel; + gchar *kcmdline; gchar *libc; - gchar *distrocode, *distro; + gchar *distrocode; + gchar *distroid; + gchar *distro; gchar *hostname; gchar *language; gchar *homedir; @@ -97,10 +108,12 @@ struct _OperatingSystem { gchar *desktop; gchar *username; - + gchar *boots; gchar *entropy_avail; + + const DistroFlavor* distro_flavor; }; struct _MemoryInfo { @@ -108,6 +121,12 @@ struct _MemoryInfo { gfloat ratio; }; +struct _Distro { + gchar *distro; + gchar *codename; + gchar *id; +}; + #define get_str(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ ptr = g_strdup(tmp[1]); \ @@ -137,16 +156,31 @@ extern gchar *module_list; gchar *computer_get_formatted_loadavg(); gchar *computer_get_formatted_uptime(); gchar *computer_get_alsacards(Computer * computer); -gchar *computer_get_entropy_avail(); +gchar *computer_get_entropy_avail(void); +gchar *computer_get_aslr(void); +gchar *computer_get_dmesg_status(void); +const gchar *computer_get_selinux(void); +gchar *computer_get_lsm(void); OperatingSystem *computer_get_os(void); AlsaInfo *computer_get_alsainfo(void); MemoryInfo *computer_get_memory(void); UptimeInfo *computer_get_uptime(void); DisplayInfo *computer_get_display(void); +void computer_free_display(DisplayInfo *di); void scan_modules_do(void); void scan_filesystems(void); void scan_users_do(void); +/* Memory Usage */ +extern GHashTable *memlabels; +void init_memory_labels(void); +void scan_memory_do(void); +void scan_boots_real(void); +void scan_languages(OperatingSystem *os); +void scan_groups_do(void); + +void kernel_module_icon_init(void); + #endif /* __COMPUTER_H__ */ |