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

GDK Reference Manual

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

  GDK_SELECTION_SECONDARY An additional X selection.

  enum GdkSelectionType


typedef enum
{
GDK_SELECTION_TYPE_ATOM = 4,
GDK_SELECTION_TYPE_BITMAP = 5,
GDK_SELECTION_TYPE_COLORMAP = 7,
GDK_SELECTION_TYPE_DRAWABLE = 17,
GDK_SELECTION_TYPE_INTEGER = 19,
GDK_SELECTION_TYPE_PIXMAP = 20,
GDK_SELECTION_TYPE_WINDOW = 33,
GDK_SELECTION_TYPE_STRING = 31
} GdkSelectionType; 

  The GdkSelectionType enumeration contains predefined atom values used to represent the types of data transferred in response to a request for a target. See the ICCCM for details about what data should be transferred for each of these types. Other atoms can be used, and the recommended practice for GTK+ is to to use mime types for this purpose. However, supporting these types may be useful for compatibility with older programs.

  GDK_SELECTION_TYPE_ATOM An atom. (format 32)

  GDK_SELECTION_TYPE_BITMAP A bitmap ID. (format 32)

  GDK_SELECTION_TYPE_COLORMAP A colormap ID. (format 32)

  GDK_SELECTION_TYPE_DRAWABLE A drawable ID. (format 32)

  GDK_SELECTION_TYPE_INTEGER An integer. (format 32)

  GDK_SELECTION_TYPE_PIXMAP A pixmap ID. (format 32)

  GDK_SELECTION_TYPE_WINDOW A window ID. (format 32)

  GDK_SELECTION_TYPE_STRING A string encoded in ISO Latin-1. (With the additional of TAB and NEWLINE.) (format 8)

  enum GdkTarget


typedef enum
{
GDK_TARGET_BITMAP = 5,
GDK_TARGET_COLORMAP = 7,
GDK_TARGET_DRAWABLE = 17,
GDK_TARGET_PIXMAP = 20,
GDK_TARGET_STRING = 31
} GdkTarget; 

  The GdkTarget enumeration contains predefined atom values which are used to describe possible targets for a selection. Other atoms can be used, and the recommended practice for GTK+ is to to use mime types for this purpose. However, supporting these types may be useful for compatibility with older programs.

  GDK_TARGET_BITMAP A bitmap ID.

  GDK_TARGET_COLORMAP A colormap ID.

  GDK_TARGET_DRAWABLE A drawable ID.

  GDK_TARGET_PIXMAP A pixmap ID.

  GDK_TARGET_STRING A string encoded in ISO Latin-1. (With the additional of TAB and NEWLINE.)


gdk_selection_owner_set ()
gintgdk_selection_owner_set (GdkWindow *owner,
GdkAtom selection,guint32 time,gint send_event); 

  Set the owner of the given selection.

  owner : a GdkWindow or NULL to indicate that the the owner for the given should be unset.

  selection : an atom identifying a selection.

  time : timestamp to use when setting the selection. If this is older than the timestamp given last time the owner was set for the given selection, the request will be ignored.

  send_event : if TRUE, and the new owner is different from the current owner, the current owner will be sent a SelectionClear event.

  Returns : TRUE if the selection owner was succesfully changed to owner, otherwise FALSE.


gdk_selection_owner_get ()
GdkWindow*gdk_selection_owner_get (GdkAtom selection); 

  Determine the owner of the given selection.

  selection : an atom indentifying a selection.

  Returns : if there is a selection owner for this window, and it is a window known to the current process, the GdkWindow that owns the selection, otherwise NULL. Note that the return value may be owned by a different process if a foreign window was previously created for that window, but a new foreign window will never be created by this call.


gdk_selection_convert ()
voidgdk_selection_convert (GdkWindow *requestor,
GdkAtom selection,GdkAtom target,guint32 time); 

  Retrieve the contents of a selection in a given form.

  requestor : a GdkWindow.

  selection : an atom identifying the selection to get the contents of.

  target : the form in which to retrieve the selection.

  time : the timestamp to use when retrieving the selection. The selection owner may refuse the request if it did not own the selection at the time indicated by the timestamp.


gdk_selection_property_get ()
gintgdk_selection_property_get(GdkWindow *requestor,
guchar **data,GdkAtom *prop_type,gint *prop_format); 

  Retrieve selection data that was stored by the selection data in response to a call to gdk_selection_convert()

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



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

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号