Logo Search packages:      
Sourcecode: hardinfo version File versions  Download package

hardinfo.h

#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"

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;
};

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);

#endif

Generated by  Doxygen 1.6.0   Back to index