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

GDK Reference Manual

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

  GDK_PROXIMITY_IN_MASK

  GDK_PROXIMITY_OUT_MASK

  GDK_SUBSTRUCTURE_MASK

  GDK_ALL_EVENTS_MASK the combination of all the above event masks.


GDK_CURRENT_TIME
#define GDK_CURRENT_TIME 0L 

  Represents the current time, and can be used anywhere a time is expected.


GDK_PRIORITY_EVENTS
#defineGDK_PRIORITY_EVENTS(G_PRIORITY_DEFAULT) 

  This is the priority that events from the X server are given in the GLib Main Loop.


gdk_events_pending ()
gbooleangdk_events_pending(void); 

  Checks if any events are waiting to be processed.

  Returns : TRUE if any events are pending.


gdk_event_peek ()
GdkEvent* gdk_event_peek(void); 

  Gets a copy of the first GdkEvent in the event queue. (Note that this function will not get more events from the X server. It only checks the events that have already been moved to the GDK event queue.)

  Returns : a copy of the first GdkEvent on the event queue, or NULL if no events are in the queue. The returned GdkEvent should be freed with gdk_event_free().


gdk_event_get ()
GdkEvent* gdk_event_get (void); 

  Gets the next GdkEvent to be processed, fetching events from the X server if necessary.

  Returns : the next GdkEvent to be processed, or NULL if no events are pending. The returned GdkEvent should be freed with gdk_event_free().


gdk_event_get_graphics_expose ()
GdkEvent* gdk_event_get_graphics_expose (GdkWindow *window); 

  Waits for a GraphicsExpose or NoExpose event from the X server. This is used in the GtkText and GtkCList widgets in GTK+ to make sure any GraphicsExpose events are handled before the widget is scrolled.

  window : the GdkWindow to wait for the events for.

  Returns : a GdkEventExpose if a GraphicsExpose was received, or NULL if a NoExpose event was received.


gdk_event_put ()
voidgdk_event_put (GdkEvent *event); 

  Appends a copy of the given event onto the front of the event queue.

  event : a GdkEvent.


gdk_event_copy ()
GdkEvent* gdk_event_copy(GdkEvent *event); 

  Copies a GdkEvent, copying or incrementing the reference count of the resources associated with it (e.g. GdkWindow's and strings).

  event : a GdkEvent.

  Returns : a copy of event. The returned GdkEvent should be freed with gdk_event_free().


gdk_event_free ()
voidgdk_event_free(GdkEvent *event); 

  Frees a GdkEvent, freeing or decrementing any resources associated with it. Note that this function should only be called with events returned from gdk_event_peek(), gdk_event_get(), gdk_event_get_graphics_expose() and gdk_event_copy().

  event : a GdkEvent.


gdk_event_get_time ()
guint32 gdk_event_get_time(GdkEvent *event); 

  Gets the timestamp from a GdkEvent.

  event : a GdkEvent.

  Returns : the timestamp from event, or GDK_CURRENT_TIME if the event has no timestamp.


gdk_event_handler_set ()
voidgdk_event_handler_set (GdkEventFunc func,
gpointer data,GDestroyNotify notify); 

  Sets the function to call to handle all events from GDK.

  Note that GTK+ uses this to install its own event handler, so it is probably not useful for GTK+ applications.

  func : the function to call to handle events from GDK.

  data : user data to pass to the function.

  notify : the function to call when the handler function is removed, i.e. when gdk_event_handler_set() is called with another event handler.



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



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

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