summary refs log blame commit diff stats
path: root/plugins/sysinfo/parse.h
blob: 27aac7dafdfd15c8a2acb64d026d774e45d97b78 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                       
                                                                            















                                                                                                        




                                                          
/*
 * parse.h - parsing header for X-Sys
 * by mikeshoup
 * Copyright (C) 2003, 2004, 2005 Michael Shoup
 * Copyright (C) 2005, 2006 Tony Vroon
 *
 * 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; either version 2 of the License, or
 * (at your option) any later version.
 *
 * 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 _PARSE_H_
#define _PARSE_H_

int xs_parse_cpu(char *model, char *vendor, double *freq, char *cache, unsigned int *count);
int xs_parse_uptime(int *weeks, int *days, int *hours, int *minutes, int *seconds);
int xs_parse_os(char *user, char *host, char *kernel);
int xs_parse_sound(char *snd_card);
int xs_parse_netdev(const char *device, unsigned long long *bytes_recv, unsigned long long *bytes_sent);
int xs_parse_df(const char *mount_point, char *string);
int xs_parse_meminfo(unsigned long long *mem_tot, unsigned long long *mem_free, int swap);
int xs_parse_video(char *vid_card);
int xs_parse_agpbridge(char *agp_bridge);
int xs_parse_ether(char *ethernet_card);
int xs_parse_distro(char *name);
int xs_parse_hwmon_chip(char *chip);
int xs_parse_hwmon_temp(char *temp, unsigned int *sensor);

#endif
an>chanlist_join; GtkWidget *chanlist_savelist; GtkWidget *chanlist_search; GSList *chanlist_data_stored_rows; /* stored list so it can be resorted */ GSList *chanlist_pending_rows; gint chanlist_tag; gint chanlist_flash_tag; gboolean chanlist_match_wants_channel; /* match in channel name */ gboolean chanlist_match_wants_topic; /* match in topic */ #ifndef WIN32 regex_t chanlist_match_regex; /* compiled regular expression here */ unsigned int have_regex; #endif guint chanlist_users_found_count; /* users total for all channels */ guint chanlist_users_shown_count; /* users total for displayed channels */ guint chanlist_channels_found_count; /* channel total for /LIST operation */ guint chanlist_channels_shown_count; /* total number of displayed channels */ int chanlist_maxusers; int chanlist_minusers; int chanlist_minusers_downloaded; /* used by LIST IRC command */ int chanlist_search_type; /* 0=simple 1=pattern/wildcard 2=regexp */ gboolean chanlist_caption_is_stale; }; /* this struct is persistant even when delinking/relinking */ typedef struct restore_gui { /* banlist stuff */ GtkWidget *banlist_window; GtkWidget *banlist_treeview; GtkWidget *banlist_butRefresh; void *tab; /* (chan *) */ /* information stored when this tab isn't front-most */ void *user_model; /* for filling the GtkTreeView */ void *buffer; /* xtext_Buffer */ char *input_text; /* input text buffer (while not-front tab) */ char *topic_text; /* topic GtkEntry buffer */ char *key_text; char *limit_text; gfloat old_ul_value; /* old userlist value (for adj) */ gfloat lag_value; /* lag-o-meter */ char *lag_text; /* lag-o-meter text */ char *lag_tip; /* lag-o-meter tooltip */ gfloat queue_value; /* outbound queue meter */ char *queue_text; /* outbound queue text */ char *queue_tip; /* outbound queue tooltip */ short flag_wid_state[NUM_FLAG_WIDS]; unsigned int c_graph:1; /* connecting graph, is there one? */ } restore_gui; typedef struct session_gui { GtkWidget *xtext, *vscrollbar, *window, /* toplevel */ *topic_entry, *note_book, *main_table, *user_tree, /* GtkTreeView */ *user_box, /* userlist box */ *button_box_parent, *button_box, /* userlist buttons' box */ *dialogbutton_box, *topicbutton_box, *meter_box, /* all the meters inside this */ *lagometer, *laginfo, *throttlemeter, *throttleinfo, *topic_bar, *hpane_left, *hpane_right, *vpane_left, *vpane_right, *menu, *bar, /* connecting progress bar */ *nick_box, /* contains label to the left of input_box */ *nick_label, *op_xpm, /* icon to the left of nickname */ *namelistinfo, /* label above userlist */ *input_box, *flag_wid[NUM_FLAG_WIDS], /* channelmode buttons */ *limit_entry, /* +l */ *key_entry; /* +k */ #define MENU_ID_NUM 12 GtkWidget *menu_item[MENU_ID_NUM+1]; /* some items we may change state of */ void *chanview; /* chanview.h */ int bartag; /*connecting progressbar timeout */ int pane_left_size; /*last position of the pane*/ int pane_right_size; guint16 is_tab; /* is tab or toplevel? */ guint16 ul_hidden; /* userlist hidden? */ } session_gui; extern GdkPixmap *channelwin_pix; extern GdkPixmap *dialogwin_pix; #ifdef USE_GTKSPELL char *SPELL_ENTRY_GET_TEXT (GtkWidget *entry); #define SPELL_ENTRY_SET_TEXT(e,txt) gtk_text_buffer_set_text (gtk_text_view_get_buffer(GTK_TEXT_VIEW(e)),txt,-1); #define SPELL_ENTRY_SET_EDITABLE(e,v) gtk_text_view_set_editable(GTK_TEXT_VIEW(e), v) int SPELL_ENTRY_GET_POS (GtkWidget *entry); void SPELL_ENTRY_SET_POS (GtkWidget *entry, int pos); void SPELL_ENTRY_INSERT (GtkWidget *entry, const char *text, int len, int *pos); #else #define SPELL_ENTRY_GET_TEXT(e) (GTK_ENTRY(e)->text) #define SPELL_ENTRY_SET_TEXT(e,txt) gtk_entry_set_text(GTK_ENTRY(e),txt) #define SPELL_ENTRY_SET_EDITABLE(e,v) gtk_editable_set_editable(GTK_EDITABLE(e),v) #define SPELL_ENTRY_GET_POS(e) gtk_editable_get_position(GTK_EDITABLE(e)) #define SPELL_ENTRY_SET_POS(e,p) gtk_editable_set_position(GTK_EDITABLE(e),p); #define SPELL_ENTRY_INSERT(e,t,l,p) gtk_editable_insert_text(GTK_EDITABLE(e),t,l,p) #endif