Ejemplo n.º 1
0
void scan_rows() {
  pressed_count = 0;
  for(int i = 0; i < ROW_COUNT; i++) {
    activate_row(i);
    scan_row(i);
  };
};
Ejemplo n.º 2
0
static void
mnemonic_activate (GtkLabel *label, gboolean cycling, CcUaPanel *self)
{
  GtkWidget *row;

  row = gtk_widget_get_parent (GTK_WIDGET (label));
  activate_row (self, GTK_LIST_BOX_ROW (row));
}
Ejemplo n.º 3
0
void
scan_matrix()
{
  for (uint8_t row = 0; row < NUM_ROWS; ++row)
  {
    activate_row(row);

    // Insert NOPs for synchronization
    _delay_us(20);

    // Place data on all column pins for active row
    // into a single 32 bit value.
    kb.row_data[row] = read_row_data();
  }
}
Ejemplo n.º 4
0
void scan_keys() {
  uint8_t r, c;
  for (r = 0; r < ROW_COUNT; r++) {
    activate_row(r);

    for (c = 0; c < COLUMN_COUNT; c++) {
      if (digitalRead(column_pins[c]) == LOW) {
        //record(c, r);
        heat_up(c, r);
      }
      else {
        cool_down(c, r);
      }
    }

    deactivate_row(r);
  }
}
Ejemplo n.º 5
0
gboolean on_button_press(GtkWidget* widget, GdkEventButton* evt)
{
    FmPlacesView* view = FM_PLACES_VIEW(widget);
    GtkTreePath* tp;
    GtkTreeViewColumn* col;
    gboolean ret = GTK_WIDGET_CLASS(fm_places_view_parent_class)->button_press_event(widget, evt);
    int cell_x;

    gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(view), evt->x, evt->y, &tp, &col, NULL, NULL);
    view->clicked_row = tp;
    if(tp)
    {
        switch(evt->button) /* middle click */
        {
        case 1: /* left click */
            break;
        case 2: /* middle click */
            activate_row(view, 2, tp);
            break;
        case 3: /* right click */
            {
                GtkTreeIter it;
                if(gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &it, tp)
                    && !fm_places_model_iter_is_separator(FM_PLACES_MODEL(model), &it) )
                {
                    FmPlaceItem* item;
                    GtkWidget* menu;
                    gtk_tree_model_get(GTK_TREE_MODEL(model), &it, FM_PLACES_MODEL_COL_INFO, &item, -1);
                    menu = place_item_get_menu(item);
                    if(menu)
                    {
                        gtk_menu_attach_to_widget(GTK_MENU(menu), widget, NULL);
                        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, evt->time);
                    }
                }
            }
            break;
        }
    }
    return ret;
}
Ejemplo n.º 6
0
void on_row_activated(GtkTreeView* view, GtkTreePath* tree_path, GtkTreeViewColumn *col)
{
    activate_row(FM_PLACES_VIEW(view), 1, tree_path);
}
Ejemplo n.º 7
0
static void play_cb (void)
{
    activate_row (NULL, aud_playlist_get_active ());
}