/* Copyright (C) 2019 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

_CONFIGINCLUDE(gdkmmconfig.h)

#include <glibmm/interface.h>

_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/interface_p.h)
_PINCLUDE(gdk/gdk.h)

#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GdkDevicePadInterface GdkDevicePadInterface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

namespace Gdk
{

/** Pad device interface.
 *
 * %Gdk::DevicePad is an interface implemented by devices of type
 * Gdk::InputSource::TABLET_PAD. It allows querying the features provided
 * by the pad device.
 *
 * Tablet pads may contain one or more groups, each containing a subset
 * of the buttons/rings/strips available. get_n_groups()
 * can be used to obtain the number of groups, get_n_features()
 * and get_feature_group() can be combined to find out the
 * number of buttons/rings/strips the device has, and how are they grouped.
 *
 * Each of those groups have different modes, which may be used to map
 * each individual pad feature to multiple actions. Only one mode is
 * effective (current) for each given group, different groups may have
 * different current modes. The number of available modes in a group can
 * be found out through get_group_n_modes(), and the current mode for
 * a given group will be notified through the Gdk::EventPadGroupMode event.
 *
 * @newin{3,96}
 */
class GDKMM_API DevicePad : public Glib::Interface
{
  _CLASS_INTERFACE(DevicePad, GdkDevicePad, GDK_DEVICE_PAD, GdkDevicePadInterface, , , GDKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GdkDevicePad is an internal type
  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI

public:
  _WRAP_ENUM(Feature, GdkDevicePadFeature, decl_prefix GDKMM_API)

  _WRAP_METHOD(int get_n_groups() const, gdk_device_pad_get_n_groups)
  _WRAP_METHOD(int get_group_n_modes(int group_idx) const, gdk_device_pad_get_group_n_modes)
  _WRAP_METHOD(int get_n_features(Feature feature) const, gdk_device_pad_get_n_features)
  _WRAP_METHOD(int get_feature_group(Feature feature, int feature_idx) const,
    gdk_device_pad_get_feature_group)

  // There are no properties, signals or vfuncs.
};

} // namespace Gdk
