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

GDK Reference Manual

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

  struct GdkEventNoExpose


struct GdkEventNoExpose
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
/* XXX: does anyone need the X major_code or minor_code fields? */
}; 

  Generated when the area of a GdkDrawable being copied, with gdk_draw_pixmap() or gdk_window_copy_area(), was completely available.

  FIXME: add more here.

  GdkEventType type the type of the event (GDK_NO_EXPOSE).

  GdkWindow *window the window which received the event.

  gint8 send_event TRUE if the event was sent explicitly (e.g. using XSendEvent).

  enum GdkVisibilityState


typedef enum {
GDK_VISIBILITY_UNOBSCURED,
GDK_VISIBILITY_PARTIAL,
GDK_VISIBILITY_FULLY_OBSCURED
} GdkVisibilityState; 

  Specifies the visiblity status of a window for a GdkEventVisibility.

  GDK_VISIBILITY_UNOBSCURED the window is completely visible.

  GDK_VISIBILITY_PARTIAL the window is partially visible.

  GDK_VISIBILITY_FULLY_OBSCURED the window is not visible at all.

  enum GdkCrossingMode


typedef enum
{
GDK_CROSSING_NORMAL,
GDK_CROSSING_GRAB,
GDK_CROSSING_UNGRAB
} GdkCrossingMode; 

  enum GdkNotifyType


typedef enum
{
GDK_NOTIFY_ANCESTOR= 0,
GDK_NOTIFY_VIRTUAL= 1,
GDK_NOTIFY_INFERIOR= 2,
GDK_NOTIFY_NONLINEAR= 3,
GDK_NOTIFY_NONLINEAR_VIRTUAL= 4,
GDK_NOTIFY_UNKNOWN= 5
} GdkNotifyType; 

  enum GdkPropertyState


typedef enum
{
GDK_PROPERTY_NEW_VALUE,
GDK_PROPERTY_DELETE
} GdkPropertyState; 

  Specifies the type of a property change for a GdkEventProperty.

  GDK_PROPERTY_NEW_VALUE the property value wan changed.

  GDK_PROPERTY_DELETE the property was deleted.

Selections

Name

  Selections -- functions for transfering data via the X selection mechanism.

Synopsis


#include <gdk/gdk.h>
enumGdkSelection;
enumGdkSelectionType;
enumGdkTarget;
gintgdk_selection_owner_set (GdkWindow *owner,
GdkAtom selection,guint32 time,gint send_event);
GdkWindow*gdk_selection_owner_get (GdkAtom selection);
voidgdk_selection_convert (GdkWindow *requestor,
GdkAtom selection,GdkAtom target,guint32 time);
gintgdk_selection_property_get(GdkWindow *requestor,
guchar **data,GdkAtom *prop_type,gint *prop_format);
voidgdk_selection_send_notify (guint32 requestor,
GdkAtom selection,GdkAtom target,GdkAtom property,guint32 time); 

Description

  The X selection mechanism provides a way to transfer arbitrary chunks of data between programs. A selection is a essentially a named clipboard, identified by a string interned as a GdkAtom. By claiming ownership of a selection, an application indicates that it will be responsible for supplying its contents. The most common selections are PRIMARY and CLIPBOARD.

  The contents of a selection can be represented in a number of formats, called targets. Each target is identified by an atom. A list of all possible targets supported by the selection owner can be retrieved by requesting the special target TARGETS. When a selection is retrieved, the data is accompanied by a type (an atom), and a format (an integer, representing the number of bits per item). See Properties and Atoms for more information.

  The functions in this section only contain the lowlevel parts of the selection protocol. A considerably more complicated implementation is needed on top of this. GTK+ contains such an implementation in the functions in gtkselection.h and programmers should use those functions instead of the ones presented here. If you plan to implement selection handling directly on top of the functions here, you should refer to the X Inter-client Communication Conventions Manual (ICCCM).

Details

  enum GdkSelection


typedef enum
{
GDK_SELECTION_PRIMARY = 1,
GDK_SELECTION_SECONDARY = 2
} GdkSelection; 

  The GdkSelection enumeration contains predefined atom values for several common selections.

  GDK_SELECTION_PRIMARY The primary X selection. Programs typically claim this selection when the user selects text and paste its contents in response to a middle button press.

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



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

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