hdy-dialer-cycle-button.h 1.51 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
#pragma once
Guido Gunther's avatar
Guido Gunther committed
8

9
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
Guido Gunther's avatar
Guido Gunther committed
10 11 12 13 14 15 16 17 18 19 20 21
#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)

/**
22
 * HdyDialerCycleButtonClass:
Guido Gunther's avatar
Guido Gunther committed
23 24 25 26 27 28 29 30
 * @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;

31
  /* Signals */
Guido Gunther's avatar
Guido Gunther committed
32 33 34 35
  void (*cycle_start)   (HdyDialerCycleButton    *self);
  void (*cycle_end)     (HdyDialerCycleButton    *self);
};

36
GtkWidget     *hdy_dialer_cycle_button_new                   (const gchar          *symbols);
Guido Gunther's avatar
Guido Gunther committed
37 38 39 40 41
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,
42
                                                              gint                  timeout);
Guido Gunther's avatar
Guido Gunther committed
43 44

G_END_DECLS