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

GDK Reference Manual

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

GdkEventFunc ()
void(*GdkEventFunc) (GdkEvent *event,gpointer data); 

  Specifies the type of function passed to gdk_event_handler_set() to handle all GDK events.

  event : the GdkEvent to process.

  data : user data set when the event handler was installed with gdk_event_handler_set().


gdk_event_send_client_message ()
gbooleangdk_event_send_client_message (GdkEvent *event,guint32 xid); 

  Sends an X ClientMessage event to a given window.

  This could be used for communicating between different applications, though the amount of data is limited to 20 bytes.

  event : the GdkEvent to send, which should be a GdkEventClient.

  xid : the window to send the X ClientMessage event to.

  Returns : non-zero on success.


gdk_event_send_clientmessage_toall ()
voidgdk_event_send_clientmessage_toall
(GdkEvent *event); 

  Sends an X ClientMessage event to all toplevel windows.

  Toplevel windows are determined by checking for the WM_STATE property, as described in the Inter-Client Communication Conventions Manual (ICCCM). If no windows are found with the WM_STATE property set, the message is sent to all children of the root window.

  event : the GdkEvent to send, which should be a GdkEventClient.


gdk_add_client_message_filter ()
voidgdk_add_client_message_filter (GdkAtom message_type,
GdkFilterFunc func,gpointer data); 

  Adds a filter to be called when X ClientMessage events are received.

  message_type : the type of ClientMessage events to receive. This will be checked against the message_type field of the XClientMessage event struct.

  func : the function to call to process the event.

  data : user data to pass to func.


gdk_get_show_events ()
gintgdk_get_show_events (void); 

  Returns non-zero if event debugging output is enabled.

  Returns : non-zero if event debugging output is enabled.


gdk_set_show_events ()
voidgdk_set_show_events (gint show_events); 

  Sets whether event debugging information is output. Note that GTK+ must be compiled with debugging enabled, i.e. using the '--enable-debug' configure option.

  show_events : TRUE to output event debugging information.

  See Also

Event Structures

  The structs used for each type of event.

Event Structures

Name

  Event Structures -- data structures specific to each type of event.

Synopsis


#include <gdk/gdk.h>
union GdkEvent;
structGdkEventAny;
structGdkEventKey;
structGdkEventButton;
structGdkEventMotion;
structGdkEventExpose;
structGdkEventVisibility;
structGdkEventCrossing;
structGdkEventFocus;
structGdkEventConfigure;
structGdkEventProperty;
structGdkEventSelection;
structGdkEventDND;
structGdkEventProximity;
structGdkEventClient;
structGdkEventNoExpose;
enumGdkVisibilityState;
enumGdkCrossingMode;
enumGdkNotifyType;
enumGdkPropertyState; 

Description

  The event structs contain data specific to each type of event in GDK.

  Note: A common mistake is to forget to set the event mask of a widget so that the required events are received. See gtk_widget_set_events().

Details

  union GdkEvent


union GdkEvent
{
GdkEventTypetype;
GdkEventAnyany;
GdkEventExposeexpose;
GdkEventNoExposeno_expose;
GdkEventVisibilityvisibility;
GdkEventMotionmotion;
GdkEventButtonbutton;
GdkEventKeykey;
GdkEventCrossingcrossing;
GdkEventFocusfocus_change;
GdkEventConfigureconfigure;
GdkEventPropertyproperty;
GdkEventSelectionselection;
GdkEventProximityproximity;
GdkEventClientclient;
GdkEventDND dnd;
}; 

  The GdkEvent struct contains a union of all of the event structs, and allows access to the data fields in a number of ways.

  The event type is always the first field in all of the event structs, and can always be accessed with the following code, no matter what type of event it is:



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

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 4041 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 下一页


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

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
·Motorola微处理器bootloader分析与应用
·Fedora Core5 NFS服务器搭建过程介绍
·Linux系统:让内存不再泄漏的实用技巧
·新手看招 手把手教你安装VMware虚拟机
·“侵权事件” 红帽称微软企图干扰用户
·删除Linux后 如何找回Windows启动菜单
·菜鸟乐园 Linux中常见文件系统格式介绍
·Linux操作系统下IPTables配置方法详解
·实用技巧 Linux系统的经典使用技巧八则
·Linux系统文件优化及磁盘检查方法介绍
Power by linux-cn.com 粤ICP备05006655号