Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GDK Reference Manual

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]

  GdkDeviceKey *keys a pointer to an array of GdkDeviceKey structures which describe what key press events are generated for each macro button.

  struct GdkDeviceKey


struct GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
}; 

  The GdkDeviceKey structure contains information about the mapping of one device macro button onto a normal X key event. It has the following fields:

  guint keyval the keyval to generate when the macro button is pressed. If this is 0, no keypress will be generated.

  GdkModifierType modifiers the modifiers set for the generated key event.


gdk_input_set_extension_events ()
voidgdk_input_set_extension_events(GdkWindow *window,
gint mask,GdkExtensionMode mode); 

  Turns extension events on or off for a particular window, and specifies the event mask for extension events.

  window : a GdkWindow.

  mask : the event mask

  mode : the type of extension events that are desired.

  enum GdkExtensionMode


typedef enum
{
GDK_EXTENSION_EVENTS_NONE,
GDK_EXTENSION_EVENTS_ALL,
GDK_EXTENSION_EVENTS_CURSOR
} GdkExtensionMode; 

  An enumeration used to specify which extension events are desired for a particular widget.

  GDK_EXTENSION_EVENTS_NONE no extension events are desired.

  GDK_EXTENSION_EVENTS_ALL all extension events are desired.

  GDK_EXTENSION_EVENTS_CURSOR extension events are desired only if a cursor will be displayed for the device.


gdk_input_set_source ()
voidgdk_input_set_source(guint32 deviceid,GdkInputSource source); 

  Sets the source type for a device.

  deviceid : the device to configure

  source : the new source type.

  enum GdkInputSource


typedef enum
{
GDK_SOURCE_MOUSE,
GDK_SOURCE_PEN,
GDK_SOURCE_ERASER,
GDK_SOURCE_CURSOR
} GdkInputSource; 

  An enumeration describing the type of an input device in general terms.

  GDK_SOURCE_MOUSE the device is a mouse. (This will be reported for the core pointer, even if it is something else, such as a trackball.)

  GDK_SOURCE_PEN the device is a stylus of a graphics tablet or similar device.

  GDK_SOURCE_ERASER the device is an eraser. Typically, this would be the other end of a stylus on a graphics tablet.

  GDK_SOURCE_CURSOR the device is a graphics tablet "puck" or similar device.


gdk_input_set_mode ()
gintgdk_input_set_mode(guint32 deviceid,GdkInputMode mode); 

  Enables or disables a device, and determines how the device maps onto the screen.

  deviceid : the device to configure.

  mode : the new mode.

  Returns : TRUE if the device supports the given mode, otherwise FALSE and the device's mode is unchanged.

  enum GdkInputMode


typedef enum
{
GDK_MODE_DISABLED,
GDK_MODE_SCREEN,
GDK_MODE_WINDOW
} GdkInputMode; 

  An enumeration that describes the mode of an input device.

  GDK_MODE_DISABLED the device is disabled and will not report any events.

  GDK_MODE_SCREEN the device is enabled. The device's coordinate space maps to the entire screen.

  GDK_MODE_WINDOW the device is enabled. The device's coordinate space is mapped to a single window. The manner in which this window is chosen is undefined, but it will typically be the same way in which the focus window for key events is determined.


gdk_input_set_axes ()
voidgdk_input_set_axes(guint32 deviceid,GdkAxisUse *axes); 

  Sets the mapping of the axes (valuators) of a device onto the predefined valuator types that GTK+ understands.

  deviceid : the device to configure.

  axes : an array of GdkAxisUse. This length of this array must match the number of axes for the device.

  enum GdkAxisUse


typedef enum
{
GDK_AXIS_IGNORE,
GDK_AXIS_X,
GDK_AXIS_Y,
GDK_AXIS_PRESSURE,
GDK_AXIS_XTILT,
GDK_AXIS_YTILT,
GDK_AXIS_LAST
} GdkAxisUse; 


 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:GTK v1.2 Tutorial(英文)   下一篇:Java入门(12) 事件与错误处理

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章