]> sigrok.org Git - sigrok-gtk.git/blobdiff - toolbar.c
sr: rename all sr_hwplugin(s)_* functions to sr_hw_*
[sigrok-gtk.git] / toolbar.c
index 5a2d0a82d8a2b5e8111ed93cfa9ca30e5c61d254..76e1ab5bab924763e99e4095de247c0c7959f4f3 100644 (file)
--- a/toolbar.c
+++ b/toolbar.c
@@ -143,7 +143,7 @@ static void dev_set_options(GtkAction *action, GtkWindow *parent)
        GtkTreeIter iter;
        for (cap = 0; capabilities[cap]; cap++) {
                struct sr_hwcap_option *hwo;
-               if (!(hwo = sr_find_hwcap_option(capabilities[cap])))
+               if (!(hwo = sr_hw_hwcap_get(capabilities[cap])))
                        continue;
                gtk_list_store_append(props, &iter);
                gtk_list_store_set(props, &iter, 
@@ -214,7 +214,7 @@ static void probe_toggled(GtkCellRenderer *cel, gchar *path,
        gtk_tree_model_get_iter_from_string(probes, &iter, path);
        gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, 
                                        PROBE_ENABLED, &en, -1);
-       probe = sr_device_probe_find(device, i);
+       probe = sr_dev_probe_find(device, i);
        probe->enabled = !en;
        gtk_list_store_set(GTK_LIST_STORE(probes), &iter, 
                                        PROBE_ENABLED, probe->enabled, -1);
@@ -231,7 +231,7 @@ static void probe_named(GtkCellRendererText *cel, gchar *path, gchar *text,
 
        gtk_tree_model_get_iter_from_string(probes, &iter, path);
        gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
-       sr_device_probe_name(device, i, text);
+       sr_dev_probe_name(device, i, text);
        gtk_list_store_set(GTK_LIST_STORE(probes), &iter, PROBE_NAME, text, -1);
 }
 
@@ -246,7 +246,7 @@ static void probe_trigger_set(GtkCellRendererText *cel, gchar *path,
 
        gtk_tree_model_get_iter_from_string(probes, &iter, path);
        gtk_tree_model_get(probes, &iter, PROBE_NUMBER, &i, -1);
-       sr_device_trigger_set(device, i, text);
+       sr_dev_trigger_set(device, i, text);
        gtk_list_store_set(GTK_LIST_STORE(probes), &iter, 
                                        PROBE_TRIGGER, text, -1);
 }
@@ -354,8 +354,7 @@ static void capture_run(GtkAction *action, GObject *parent)
        }
 
        if (time_msec) {
-               int *capabilities = device->plugin->get_capabilities();
-               if (sr_find_hwcap(capabilities, SR_HWCAP_LIMIT_MSEC)) {
+               if (sr_hw_has_hwcap(device->plugin, SR_HWCAP_LIMIT_MSEC)) {
                        if (device->plugin->set_configuration(device->plugin_index,
                                                        SR_HWCAP_LIMIT_MSEC,
                                                        &time_msec) != SR_OK) {
@@ -368,7 +367,7 @@ static void capture_run(GtkAction *action, GObject *parent)
                         * convert to samples based on the samplerate.
                         */
                        limit_samples = 0;
-                       if (sr_device_has_hwcap(device, SR_HWCAP_SAMPLERATE)) {
+                       if (sr_dev_has_hwcap(device, SR_HWCAP_SAMPLERATE)) {
                                guint64 tmp_u64;
                                tmp_u64 = *((uint64_t *) device->plugin->get_device_info(
                                                        device->plugin_index,