hdy-dialer-cycle-button.h 1.53 KB
Newer Older
Guido Gunther's avatar
Guido Gunther committed
1 2 3
/*
 * Copyright (C) 2017 Purism SPC
 *
4
 * SPDX-License-Identifier: LGPL-2.1+
Guido Gunther's avatar
Guido Gunther committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
 */

#ifndef HDY_DIALER_CYCLE_BUTTON_H
#define HDY_DIALER_CYCLE_BUTTON_H

#if !defined(HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif

#include "hdy-dialer-button.h"

G_BEGIN_DECLS

#define HDY_TYPE_DIALER_CYCLE_BUTTON (hdy_dialer_cycle_button_get_type())

G_DECLARE_DERIVABLE_TYPE (HdyDialerCycleButton, hdy_dialer_cycle_button, HDY, DIALER_CYCLE_BUTTON, HdyDialerButton)

/**
 * HdyDialerCycleButtonClass
 * @parent_class: The parent classqn
 * @cycle_start: Class handler for the #HdyDialerCycleButton::cycle-start signal
 * @cycle_end: Class handler for the #HdyDialerCycleButton::cycle-end signal
 */
struct _HdyDialerCycleButtonClass
{
  HdyDialerButtonClass parent_class;

  /* Signals
   */
  void (*cycle_start)   (HdyDialerCycleButton    *self);
  void (*cycle_end)     (HdyDialerCycleButton    *self);
};

GtkWidget *    hdy_dialer_cycle_button_new                   (const gchar* symbols);
gunichar       hdy_dialer_cycle_button_get_current_symbol    (HdyDialerCycleButton *self);
gboolean       hdy_dialer_cycle_button_is_cycling            (HdyDialerCycleButton *self);
void           hdy_dialer_cycle_button_stop_cycle            (HdyDialerCycleButton *self);
gint           hdy_dialer_cycle_button_get_cycle_timeout     (HdyDialerCycleButton *self);
void           hdy_dialer_cycle_button_set_cycle_timeout     (HdyDialerCycleButton *self,
							      gint timeout);

G_END_DECLS

#endif /* HDY_DIALER_CYCLE_BUTTON_H */