GkrellmMonitor * gkrellm_init_plugin(void) #endif { style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); monitor = &plugin_mon; return &plugin_mon; }
Monitor * init_plugin(void) { last_lcd = -1; style_id = gkrellm_add_meter_style( &plugin_mon, STYLE_NAME ); monitor = &plugin_mon; return &plugin_mon; }
/* All GKrellM plugins must have one global routine named init_plugin() | which returns a pointer to a filled in monitor structure. */ GkrellmMonitor * gkrellm_init_plugin() { #ifdef ENABLE_NLS bind_textdomain_codeset(PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); plugin_monitor = &plugin_mon; #ifdef HAVE_LIRC gkrellm_radio_lirc_init(); g_atexit(gkrellm_radio_lirc_exit); #endif g_atexit(exit_func); return &plugin_mon; }
GkrellmMonitor * gkrellm_init_plugin(void) #endif { /* If this call is made, the background and krell images for this plugin | can be custom themed by putting bg_meter.png or krell.png in the | subdirectory STYLE_NAME of the theme directory. Text colors (and | other things) can also be specified for the plugin with gkrellmrc | lines like: StyleMeter STYLE_NAME.textcolor orange black shadow | If no custom themeing has been done, then all above calls using | style_id will be equivalent to style_id = DEFAULT_STYLE_ID. */ style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); monitor = &plugin_mon; return &plugin_mon; }
GkrellmMonitor* gkrellm_init_plugin(void) { /* If this next call is made, the background and krell images for this plugin can be custom themed by putting bg_meter.png or krell.png in the subdirectory STYLE_NAME of the theme directory. Text colors (and other things) can also be specified for the plugin with gkrellmrc lines like: StyleMeter STYLE_NAME.textcolor orange black shadow If no custom theming has been done, then all above calls using style_id will be equivalent to style_id = DEFAULT_STYLE_ID. */ pGK = gkrellm_ticks(); style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); monitor = &plugin_mon; /* determine number of cpus */ for( ncpu = 0; cpufreq_get_freq_kernel(ncpu)>0; ++ncpu ) ; ncpu = ncpu > NCPU_MAX ? NCPU_MAX : ncpu; /* determine maximal frequency */ unsigned int cpu; for ( cpu = 0; cpu<ncpu; ++cpu) { unsigned long khz_min = 0; unsigned long khz_max_i = 0; cpufreq_get_hardware_limits( cpu, &khz_min, &khz_max_i ); khz_max = khz_max < khz_max_i ? khz_max_i : khz_max; } read_khz(); strcpy(empty, ""); if (gov_enable_current) { read_governors(); } else { for ( cpu=0; cpu<ncpu; ++cpu ) { strcpy(governor[cpu], ""); } } return &plugin_mon; }