diff options
author | Viktor Odintsev <zakhams@gmail.com> | 2017-06-28 22:57:26 +0300 |
---|---|---|
committer | Viktor Odintsev <ninetls@xfce.org> | 2017-06-28 22:57:26 +0300 |
commit | 473ef8458b4e31711cbf2f7675d6bf0bbba52df5 (patch) | |
tree | e14748523e44b2d2df8b6683106ce8ca257f19a4 /settings-dialogs/range-debouncer.h | |
parent | 4c101f9b807fbd5e1067ca7254740a4ef1744e68 (diff) | |
download | xfwm4-473ef8458b4e31711cbf2f7675d6bf0bbba52df5.tar.gz |
Implement RangeDebouncer
This object allows to easily listen GtkRange value when drag
was finished. This was allowed in GTK2 with "update-policy" attribute
set to "discontinuous" which was removed in GTK3.
Diffstat (limited to 'settings-dialogs/range-debouncer.h')
-rw-r--r-- | settings-dialogs/range-debouncer.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/settings-dialogs/range-debouncer.h b/settings-dialogs/range-debouncer.h new file mode 100644 index 000000000..4db04b4c2 --- /dev/null +++ b/settings-dialogs/range-debouncer.h @@ -0,0 +1,44 @@ +/* vi:set sw=2 sts=2 ts=2 et ai tw=100: */ +/*- + * Copyright (c) 2017 Viktor Odintsev <zakhams@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __RANGE_DEBOUNCER_H__ +#define __RANGE_DEBOUNCER_H__ + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +typedef struct _RangeDebouncerClass RangeDebouncerClass; +typedef struct _RangeDebouncer RangeDebouncer; + +#define TYPE_RANGE_DEBOUNCER (range_debouncer_get_type ()) +#define RANGE_DEBOUNCER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RANGE_DEBOUNCER, RangeDebouncer)) +#define RANGE_DEBOUNCER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RANGE_DEBOUNCER, RangeDebouncerClass)) +#define IS_RANGE_DEBOUNCER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RANGE_DEBOUNCER)) +#define IS_RANGE_DEBOUNCER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RANGE_DEBOUNCER)) +#define RANGE_DEBOUNCER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RANGE_DEBOUNCER, RangeDebouncerClass)) + +GType range_debouncer_get_type (void) G_GNUC_CONST; + +RangeDebouncer * range_debouncer_bind (GtkRange *range); + +G_END_DECLS + +#endif /* __RANGE_DEBOUNCER_H__ */ |