diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:33 -0500 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:33 -0500 |
commit | 854292407779593a401a1d5ce71add51880fa84f (patch) | |
tree | 42b5f1896eda603c04a30db1effb133f10f71ca8 /hardinfo.h | |
parent | a08438bda21b3e0d7db2db2360d040841970104d (diff) |
Import Upstream version 0.4
Diffstat (limited to 'hardinfo.h')
-rw-r--r-- | hardinfo.h | 109 |
1 files changed, 27 insertions, 82 deletions
@@ -1,91 +1,36 @@ +/* + * HardInfo - Displays System Information + * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.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. + * + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef __HARDINFO_H__ #define __HARDINFO_H__ -#define walk_until(x) while((*buf != '\0') && (*buf != x)) buf++ -#define walk_until_inclusive(x) walk_until(x); buf++ - -#define PREFIX "/usr/share/hardinfo/" -#define IMG_PREFIX PREFIX "pixmaps/" - #include <gtk/gtk.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> - -#include "config.h" -#include "stock.h" - -#ifdef ENABLE_NLS -#define INTL_PREFIX PREFIX "lang/" -#include "intl.h" -#else -#define _(x) (x) -#endif - -typedef struct _GenericDevice GenericDevice; -typedef enum _DeviceType DeviceType; -typedef struct _MainWindow MainWindow; - -enum _DeviceType { - NONE, PCI, ISAPnP, USB, - IDE, SCSI, SERIAL, PARPORT, - V4L, PROCESSOR, MODULE -}; - -struct _GenericDevice { - gpointer device; - DeviceType type; - - GtkCTreeNode *node; - - GenericDevice *next; -}; -#include "details.h" +typedef struct _ModuleEntry ModuleEntry; -struct _MainWindow { - GtkWidget *window; - - GtkWidget *ctree; - - GtkWidget *membar; - GtkWidget *uptime; - - GtkWidget *recv_bytes; - GtkWidget *recv_errors; - GtkWidget *recv_packets; - - GtkWidget *trans_bytes; - GtkWidget *trans_errors; - GtkWidget *trans_packets; - - GtkWidget *details_button; - DetailWindow *det_window; +struct _ModuleEntry { + gchar *name; + gchar *icon; }; -extern GenericDevice *generic_devices; - -#include "ide.h" -#include "scsi.h" -#include "isapnp.h" -#include "usb.h" -#include "pci.h" -#include "serial.h" -#include "parport.h" -#include "v4l.h" -#include "modules.h" -#include "x11.h" -#include "net.h" - -#include "about.h" -#include "details.h" - -GtkCTreeNode *tree_group_new(MainWindow *mainwindow, const gchar *name, - DeviceType type); -void tree_insert_item(MainWindow *mainwindow, GtkCTreeNode *group, gchar *name, - gpointer data); -void hi_insert_generic(gpointer device, DeviceType type); -void hi_show_device_info_real(MainWindow *mainwindow, - GenericDevice *dev); +inline void remove_quotes(gchar *str); +inline void strend(gchar *str, gchar chr); +inline void remove_linefeed(gchar *str); + void widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); -#endif +#endif /* __HARDINFO_H__ */ |