Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkpadcontroller.h
Go to the documentation of this file.
1/* GTK - The GIMP Toolkit
2 * Copyright (C) 2016, Red Hat, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author(s): Carlos Garnacho <carlosg@gnome.org>
18 */
19
20#pragma once
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <gdk/gdk.h>
28
30
31#define GTK_TYPE_PAD_CONTROLLER (gtk_pad_controller_get_type ())
32#define GTK_PAD_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_PAD_CONTROLLER, GtkPadController))
33#define GTK_PAD_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_PAD_CONTROLLER, GtkPadControllerClass))
34#define GTK_IS_PAD_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_PAD_CONTROLLER))
35#define GTK_IS_PAD_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_PAD_CONTROLLER))
36#define GTK_PAD_CONTROLLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_PAD_CONTROLLER, GtkPadControllerClass))
37
38typedef struct _GtkPadController GtkPadController;
39typedef struct _GtkPadControllerClass GtkPadControllerClass;
41
42/**
43 * GtkPadActionType:
44 * @GTK_PAD_ACTION_BUTTON: Action is triggered by a pad button
45 * @GTK_PAD_ACTION_RING: Action is triggered by a pad ring
46 * @GTK_PAD_ACTION_STRIP: Action is triggered by a pad strip
47 *
48 * The type of a pad action.
49 */
55
56/**
57 * GtkPadActionEntry:
58 * @type: the type of pad feature that will trigger this action entry.
59 * @index: the 0-indexed button/ring/strip number that will trigger this action
60 * entry.
61 * @mode: the mode that will trigger this action entry, or -1 for all modes.
62 * @label: Human readable description of this action entry, this string should
63 * be deemed user-visible.
64 * @action_name: action name that will be activated in the `GActionGroup`.
65 *
66 * Struct defining a pad action entry.
67 */
70 int index;
71 int mode;
72 const char *label;
73 const char *action_name;
74};
75
78
81 GdkDevice *pad);
82
85 const GtkPadActionEntry *entries,
86 int n_entries);
90 int index,
91 int mode,
92 const char *label,
93 const char *action_name);
94
96
guint index
#define GDK_AVAILABLE_IN_ALL
struct _GdkDevice GdkDevice
Definition gdktypes.h:84
struct _GActionGroup GActionGroup
Definition giotypes.h:55
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GDK_AVAILABLE_IN_ALL void gtk_pad_controller_set_action_entries(GtkPadController *controller, const GtkPadActionEntry *entries, int n_entries)
GtkPadActionType
@ GTK_PAD_ACTION_BUTTON
@ GTK_PAD_ACTION_RING
@ GTK_PAD_ACTION_STRIP
GDK_AVAILABLE_IN_ALL void gtk_pad_controller_set_action(GtkPadController *controller, GtkPadActionType type, int index, int mode, const char *label, const char *action_name)
struct _GtkPadController GtkPadController
GDK_AVAILABLE_IN_ALL GtkPadController * gtk_pad_controller_new(GActionGroup *group, GdkDevice *pad)
struct _GtkPadControllerClass GtkPadControllerClass
GDK_AVAILABLE_IN_ALL GType gtk_pad_controller_get_type(void) G_GNUC_CONST
gsize GType
Definition gtype.h:427
GtkPadActionType type
const char * action_name