00001 /* Gnome gxsm - Gnome X Scanning Microscopy 00002 * universal STM/AFM/SARLS/SPALEED/... controlling and 00003 * data analysis software 00004 * 00005 * Gxsm Plugin Name: queryDSPinfo.C 00006 * ======================================== 00007 * 00008 * Copyright (C) 1999 The Free Software Foundation 00009 * 00010 * Authors: Percy Zahl <zahl@fkp.uni-hannover.de> 00011 * additional features: Andreas Klust <klust@fkp.uni-hannover.de> 00012 * 00013 * This program is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 00026 */ 00027 00028 00029 /* Please do not change the Begin/End lines of this comment section! 00030 * this is a LaTeX style section used for auto generation of the PlugIn Manual 00031 * Chapter. Add a complete PlugIn documentation inbetween the Begin/End marks! 00032 * -------------------------------------------------------------------------------- 00033 % BeginPlugInDocuSection 00034 % PlugInDocuCaption: Query Hardware/DSP software information 00035 % PlugInName: queryDSPinfo 00036 % PlugInAuthor: Percy Zahl 00037 % PlugInAuthorEmail: zahl@users.sf.net 00038 % PlugInMenuPath: Tools/Hardware Info 00039 00040 % PlugInDescription 00041 \label{plugin:queryDSPinfo} 00042 00043 This plugin asks the DSP, e.g the connected hardware or driver/module, 00044 to report informations about the current running software. This is 00045 used by Gxsm for automatic configuration of several features. -- This 00046 new feature will be expanded and used more intens future versions. 00047 00048 % PlugInUsage 00049 Call it using the menu \GxsmMenu{Tools/Hardware Info}. 00050 00051 % OptPlugInNotes 00052 This works only with the second DSP software generation, starting with xsm CVS V1.20! 00053 And it works with the kernel DSP emulation modules! 00054 00055 % EndPlugInDocuSection 00056 * -------------------------------------------------------------------------------- 00057 */ 00058 00059 00060 #include <gtk/gtk.h> 00061 #include "config.h" 00062 #include "gxsm/plugin.h" 00063 #include "include/dsp-pci32/xsm/xsmcmd.h" 00064 00065 // ======================================== 00066 // Gxsm PlugIn Setup Part 00067 // ======================================== 00068 00069 static void queryDSPinfo_about( void ); 00070 static void queryDSPinfo_run(GtkWidget *w, void *data); 00071 static void queryDSPinfo_cleanup( void ); 00072 00073 GxsmPlugin queryDSPinfo_pi = { 00074 NULL, 00075 NULL, 00076 0, 00077 NULL, 00078 "queryDSPinfo", 00079 NULL, 00080 NULL, 00081 "Percy Zahl", 00082 N_("_Tools/"), 00083 N_("Hardware Info"), 00084 N_("Ask the DSP/hardware driver to report informations"), 00085 "no more info", 00086 NULL, 00087 NULL, 00088 NULL, 00089 NULL, 00090 queryDSPinfo_about, 00091 NULL, 00092 queryDSPinfo_run, 00093 queryDSPinfo_cleanup 00094 }; 00095 00096 GxsmPlugin *get_gxsm_plugin_info ( void ){ 00097 queryDSPinfo_pi.description = g_strdup_printf(N_("queryDSPinfo Plugin %s"), VERSION); 00098 return &queryDSPinfo_pi; 00099 } 00100 00101 static void queryDSPinfo_about(void){ 00102 const gchar *authors[] = { "Percy Zahl", NULL}; 00103 gtk_widget_show ( 00104 gnome_about_new ( queryDSPinfo_pi.name, 00105 VERSION, 00106 N_("(C) 2000 the Free Software Foundation"), 00107 "This PlugIn asks the Hardware/DSP to report " 00108 "the current software version, features and configuration.", 00109 authors, 00110 NULL, NULL, NULL 00111 )); 00112 } 00113 00114 static void queryDSPinfo_run(GtkWidget *w, void *data){ 00115 gchar *infotext = queryDSPinfo_pi.app->xsm->hardware->get_info (); 00116 gapp->message (infotext); 00117 g_free (infotext); 00118 } 00119 00120 static void queryDSPinfo_cleanup( void ){ 00121 } 00122