[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 06/10: more doxygen/javadoc-compliant documentation; nicer formatting in makefile for tabs with 4 spaces
noreply at xfce.org
noreply at xfce.org
Sat Mar 18 18:26:46 CET 2017
This is an automated email from the git hooks/post-receive script.
timystery pushed a commit to branch master
in repository panel-plugins/xfce4-sensors-plugin.
commit 8999d40ca94d7e7a4dea812c6cffe505fd911f1d
Author: Fabian <timystery at arcor.de>
Date: Sat Mar 18 01:30:28 2017 +0100
more doxygen/javadoc-compliant documentation; nicer formatting in makefile for tabs with 4 spaces
---
include/Makefile.am | 18 ++++----
include/nvidia.h | 1 +
include/sensors-interface-common.h | 55 +++++++++++++++++++----
include/sensors-interface-plugin.h | 91 +++++++++++++++++++-------------------
include/sensors-interface-types.h | 10 ++---
include/types.h | 61 +++++++++++++++++++++----
6 files changed, 161 insertions(+), 75 deletions(-)
diff --git a/include/Makefile.am b/include/Makefile.am
index c24fb05..4c3680b 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,17 +1,17 @@
EXTRA_DIST = \
- acpi.h \
- hddtemp.h \
- tacho.h \
+ acpi.h \
+ hddtemp.h \
+ tacho.h \
Makefile.am \
- sensors-interface-common.h \
- sensors-interface-plugin.h \
- sensors-interface-types.h \
- types.h \
- configuration.h \
+ sensors-interface-common.h \
+ sensors-interface-plugin.h \
+ sensors-interface-types.h \
+ types.h \
+ configuration.h \
lmsensors.h \
middlelayer.h \
- sensors-interface.h \
+ sensors-interface.h \
nvidia.h
# vi:set ts=4 sw=4 noet ai nocindent syntax=automake:
diff --git a/include/nvidia.h b/include/nvidia.h
index 13ff5d1..16030e8 100644
--- a/include/nvidia.h
+++ b/include/nvidia.h
@@ -45,6 +45,7 @@ void refresh_nvidia (gpointer chip_feature, gpointer data);
/**
* Read the temperature value from GPU
* @param gpu: index of GPU to read its value
+ * @return temperature value
*/
double get_nvidia_value (int gpu);
diff --git a/include/sensors-interface-common.h b/include/sensors-interface-common.h
index 79f31e0..aa1cb27 100644
--- a/include/sensors-interface-common.h
+++ b/include/sensors-interface-common.h
@@ -52,38 +52,77 @@
* itself.
*/
typedef struct {
- /* the sensors structure */
+ /** the sensors structure */
t_sensors *sensors;
+ /** is it the dialog of the panel plugin? */
gboolean plugin_dialog;
- /* controls dialog */
+ /** controls dialog */
GtkWidget *dialog;
/* Gtk stuff */
+ /** pointer to combobox for choosing sensor chip */
GtkWidget *myComboBox;
- /* GtkWidget *myFrame; */
+
+ /** pointer to GtkLabel for displaying the chip's name */
GtkWidget *mySensorLabel;
+
+ /** pointer to GtkTreeView widget */
GtkWidget *myTreeView;
- GtkTreeStore *myListStore[10]; /* replace by GPtrArray as well */
- /* used to disable font size option when using graphical view */
+
+ /**
+ * array of pointers to tree stores, limited to 10 as well
+ * TODO: replace by GPtrArray as well
+ */
+ GtkTreeStore *myListStore[MAX_NUM_CHIPS];
+
+ /**
+ * box with font settings for text view; used to disable font size option
+ * when using graphical/tacho view
+ */
GtkWidget *font_Box;
+
+ /** GtkBox for font settings in visual displays */
GtkWidget *fontSettings_Box;
+
+ /** button for font settings in visual displays */
GtkWidget *fontSettings_Button;
+
+ /** pointer to GtkCheckbox whether to display units in text mode */
GtkWidget *unit_checkbox;
+
+ /** pointer to surrounding GtkBox for number of text lines in text mode */
GtkWidget *Lines_Box;
+
+ /** pointer to GtkSpinButton for number of text lines */
GtkWidget *Lines_Spin_Box;
+
+ /** pointer to GtkCheckbox for opting to suppress notifications */
GtkWidget *suppressmessage_checkbox;
+
+ /** pointer to GtkCheckbox for opting to suppress tooltips */
GtkWidget *suppresstooltip_checkbox;
+
+ /** pointer to GtkCheckbox for text mode to have smaller spacings */
GtkWidget *smallspacing_checkbox;
- /* used to enable 'show labels' option when using graphical view */
+
+ /** used to enable 'show labels' option when using graphical view */
GtkWidget *labels_Box;
+
+ /**
+ * pointer to GtkCheckbox whether to colorize the checkboxes over the Gtk
+ * theme
+ */
GtkWidget *coloredBars_Box;
- GtkWidget *temperature_radio_group;
+
+ /** pointer to GtkSpinButton for selecting the refresh interval in seconds */
GtkWidget *spin_button_update_time;
- /* double-click improvement */
+ /** double-click improvement: check to activate */
GtkWidget *myExecCommand_CheckBox;
+
+ /** double-click improvement: entry for command */
GtkWidget *myCommandName_Entry;
}
t_sensors_dialog;
diff --git a/include/sensors-interface-plugin.h b/include/sensors-interface-plugin.h
index 009e1dc..879fe76 100644
--- a/include/sensors-interface-plugin.h
+++ b/include/sensors-interface-plugin.h
@@ -47,119 +47,120 @@
*/
typedef struct {
- /* pointer for Xfce Panel */
+ /** pointer for Xfce Panel */
XfcePanelPlugin *plugin;
- /* eventbox to catch events */
+ /** eventbox to catch events */
GtkWidget *eventbox;
- /* our XfceSensors widget */
+ /** our XfceSensors widget */
GtkWidget *widget_sensors;
- /* panel value display */
+ /** panel value display */
GtkWidget *panel_label_data;
- /* optional label for plugin */
+ /** optional label for plugin */
GtkWidget *panel_label_text;
- /* update the tooltip */
+ /** update the tooltip */
gint timeout_id;
- /* font size for display in panel */
+ /** font size for display in panel */
gchar *str_fontsize;
gint val_fontsize;
- /* temperature scale for display in panel */
+ /** temperature scale for display in panel */
t_tempscale scale;
- /* panel size to compute number of cols/columns */
+ /** panel size to compute number of cols/columns */
gint panel_size;
- /* Requested/allowed number of lines in text mode */
+ /** Requested/allowed number of lines in text mode */
gint lines_size;
- /* The panel plugins can cover all rows/columns of the panel, but default is to not do so */
+ /** The panel plugins can cover all rows/columns of the panel, but default is to not do so */
gboolean cover_panel_rows;
- /* panel orientation */
+ /** panel orientation */
XfcePanelPluginMode orientation;
- /* if the bars have been initialized */
+ /** if the bars have been initialized */
gboolean bars_created;
- /* if the tachos have been initialized */
+ /** if the tachos have been initialized */
gboolean tachos_created;
- /* show title in panel */
+ /** show title in panel */
gboolean show_title;
- /* show labels in panel (GUI mode only) */
+ /** show labels in panel (GUI mode only) */
gboolean show_labels;
- /* show units in textual view */
+ /** show units in textual view */
gboolean show_units;
- /* show small spacings only in textual view */
+ /** show small spacings only in textual view */
gboolean show_smallspacings;
- /* show colored bars (GUI mode only) */
+ /** show colored bars (GUI mode only) */
gboolean show_colored_bars;
- /* use the progress-bar UI */
- //gboolean display_values_graphically;
+ /** use the progress-bar UI */
e_displaystyles display_values_type;
- /* suppress Hddtemp failure messages and any other messages */
+ /** suppress Hddtemp failure messages and any other messages */
gboolean suppressmessage;
- /* suppress tooltip from overlapping widget and thereby crashing the plugin or modifying the background */
+ /**
+ * suppress tooltip from overlapping widget and thereby crashing the plugin
+ * or modifying the background
+ */
gboolean suppresstooltip;
- /* sensor update time */
+ /** sensor update time */
gint sensors_refresh_time;
/* sensor relevant stuff */
- /* no problem if less than 11 sensors, else will have to enlarge the
- following arrays. NYI!! */
+ /**
+ * no problem if less than 11 sensors, else will have to enlarge the
+ * following arrays. NYI!!
+ */
gint num_sensorchips;
- /* gint sensorsCount[SENSORS]; */
-
- /* contains the progress bar panels */
+ /** contains the progress bar panels */
/* FIXME: Might be replaced by GPtrArray as well */
t_labelledlevelbar* panels[MAX_NUM_CHIPS][MAX_NUM_FEATURES];
- GtkCssProvider *css_provider;
/* GArray *panels_array; */
- /* contains the tacho panels */
+ /** CSS provider for main dialog */
+ GtkCssProvider *css_provider;
+
+ /** contains the tacho panels */
/* FIXME: Might be replaced by GPtrArray as well */
GtkWidget* tachos[MAX_NUM_CHIPS][MAX_NUM_FEATURES];
- /* sensor types to display values in appropriate format */
- /* sensor_type sensor_types[SENSORS][FEATURES_PER_SENSOR]; */
+ /** sensor types to display values in appropriate format */
GPtrArray *chips;
- /* double-click improvement as suggested on xfce4-goodies at berlios.de */
- /* whether to execute command on double click */
+ /**
+ * double-click improvement as suggested on xfce4-goodies at berlios.de.
+ * whether to execute command on double click
+ */
gboolean exec_command;
- /* command to excute */
+ /** command to excute */
gchar* command_name;
- /* callback_id for doubleclicks */
+ /** callback_id for doubleclicks */
gint doubleclick_id;
- /* hddtemp disks */
- //GPtrArray *disklist;
- /* gint num_disks; */
-
- /* ACPI thermal zones */
- /*GPtrArray *acpi_zones;
- gint num_acpi_zones; */
-
+ /** file name of config file for plugin */
gchar *plugin_config_file;
+ /** preferred dialog width */
gint preferred_width;
+
+ /** preferred dialog height */
gint preferred_height;
}
t_sensors;
diff --git a/include/sensors-interface-types.h b/include/sensors-interface-types.h
index 03a836d..ce78ffe 100644
--- a/include/sensors-interface-types.h
+++ b/include/sensors-interface-types.h
@@ -26,16 +26,16 @@
* compound widget displaying a levelbar and optional label
*/
typedef struct {
- /* the level bar */
+ /** the level bar */
GtkWidget *progressbar;
- /* the label */
+ /** the label */
GtkWidget *label;
- /* the surrounding box */
+ /** the surrounding box */
GtkWidget *databox;
- /* We seem to need a seperate css provider per levelbar */
+ /** We seem to need a seperate css provider per levelbar */
GtkCssProvider *css_provider;
} t_labelledlevelbar;
@@ -49,4 +49,4 @@ typedef enum {
DISPLAY_TACHO
} e_displaystyles;
-#endif
+#endif /* __SENSORS_INTERFACE_TYPES */
diff --git a/include/types.h b/include/types.h
index 3375a11..b9162ac 100644
--- a/include/types.h
+++ b/include/types.h
@@ -37,11 +37,22 @@
* sensors chip name structure from libsensors it is reused for the other
* chiptypes as well
*/
- typedef struct sensors_chip_name {
- char *prefix;
- int bus; /* newer sensors.h has sensors_bus_id as struct{short,short} */
- int addr;
- char *path; /* if dummy */
+typedef struct sensors_chip_name {
+ /** first part of textual sensor's chip name */
+ char *prefix;
+
+ /**
+ * lm sensors have several "busses"; this selects a special bus, kind of
+ * array access.
+ * newer sensors.h has sensors_bus_id as struct{short,short}
+ */
+ int bus;
+
+ /** address of the selected chip at the bus */
+ int addr;
+
+ /** path? unused in sensors plugin! */
+ char *path; /* if dummy */
} sensors_chip_name;
#endif
@@ -84,16 +95,37 @@ typedef enum {
* Information about a special feature on a chip
*/
typedef struct {
+ /** name of chipfeature */
gchar *name;
+
+ /** underlying device */
gchar *devicename;
- double raw_value; /* unformatted sensor feature values */
- gchar *formatted_value; /* formatted (%f5.2) sensor feature values */
+
+ /** unformatted sensor feature values */
+ double raw_value;
+
+ /** formatted (%f5.2) sensor feature values */
+ gchar *formatted_value;
+
+ /** minimum value, used for visualization */
float min_value;
+
+ /** maximum value, used for visualization */
float max_value;
+
+ /** color for visualization */
gchar *color;
+
+ /** whether to show the value (and name) */
gboolean show;
- gint address; /* specifies the mapping to the internal number in chip_name */
+
+ /** specifies the mapping to the internal number in chip_name */
+ gint address;
+
+ /** is the chipfeature valid at all? */
gboolean valid;
+
+ /** class of chipfeature */
t_chipfeature_class class;
} t_chipfeature;
@@ -102,12 +134,25 @@ typedef struct {
* Information about a whole chip, like asb-1-45
*/
typedef struct {
+ /** ID of the sensors chip */
gchar *sensorId;
+
+ /** name of the sensors chip */
gchar *name;
+
+ /** description of the sensors chip */
gchar *description;
+
+ /** number of known features for this chip */
gint num_features;
+
+ /** pointer to libsensors chip_name structure */
sensors_chip_name *chip_name;
+
+ /** array of pointers to child chip_features */
GPtrArray *chip_features;
+
+ /** chiptype, required for middlelayer to distinguish */
t_chiptype type;
} t_chip;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list