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

GDK Reference Manual

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

  window : a GdkWindow.

  property : the property to retrieve.

  type : the desired property type, or 0, if any type of data is acceptable. If this does not match the actual type, then actual_format and actual_length will be filled in, a warning will be printed to stderr and no data will be returned.

  offset : the offset into the property at which to begin retrieving data. (in 4 byte units!)

  length : the length of the data to delete. (in bytes, but the actual retrieved length will be the next integer multiple multiple of four greater than this!)

  pdelete : if TRUE, delete the property after retrieving the data.

  actual_property_type : location to store the actual type of the property.

  actual_format : location to store the actual format of the data.

  actual_length : location to store the length of the retrieved data, in bytes.

  data : location to store a pointer to the data. The retrieved data should be freed with g_free() when you are finished using it.

  Returns : TRUE if data was sucessfully received and stored in data, otherwise FALSE.


gdk_property_change ()
voidgdk_property_change (GdkWindow *window,GdkAtom property,GdkAtom type,
gint format,GdkPropMode mode,guchar *data,gint nelements); 

  Change the contents of a property on a window.

  window : a GdkWindow.

  property : the property to change.

  type : the new type for the property. If mode is GDK_PROP_MODE_REPLACE or GDK_PROP_MODE_APPEND, then this must match the existing type or an error will occur.

  format : the new format for the property. If mode is GDK_PROP_MODE_REPLACE or GDK_PROP_MODE_APPEND, then this must match the existing format or an error will occur.

  mode : a value describing how the new data is to be combined with the current data.

  data : the data (a guchar * gushort *, or gulong *, depending on format), cast to a guchar *.

  nelements : the number of elements of size determined by the format, contained in data.

  enum GdkPropMode


typedef enum
{
GDK_PROP_MODE_REPLACE,
GDK_PROP_MODE_PREPEND,
GDK_PROP_MODE_APPEND
} GdkPropMode; 

  Describes how existing data is combined with new data when using gdk_property_change().

  GDK_PROP_MODE_REPLACE the new data replaces the existing data.

  GDK_PROP_MODE_PREPEND the new data is prepended to the existing data.

  GDK_PROP_MODE_APPEND the new data is appended to the existing data.


gdk_property_delete ()
voidgdk_property_delete (GdkWindow *window,GdkAtom property); 

  Delete a property from a window.

  window : a GdkWindow.

  property : the property to delete.

Threads

Name

  Threads --

Synopsis


#include <gdk/gdk.h>
externGMutex *gdk_threads_mutex;
#define GDK_THREADS_ENTER ()
#define GDK_THREADS_LEAVE ()
voidgdk_threads_enter (void);
voidgdk_threads_leave (void); 

  Description

  Details


gdk_threads_mutex
extern GMutex *gdk_threads_mutex; 
GDK_THREADS_ENTER()
#define GDK_THREADS_ENTER() 
GDK_THREADS_LEAVE()
#define GDK_THREADS_LEAVE() 
gdk_threads_enter ()
voidgdk_threads_enter (void); 
gdk_threads_leave ()
voidgdk_threads_leave (void); 

Input

Name

  Input -- Callbacks on file descriptors.

Synopsis


#include <gdk/gdk.h>
gintgdk_input_add_full(gint source,GdkInputCondition condition,
GdkInputFunction function,gpointer data,GdkDestroyNotify destroy);
enumGdkInputCondition;
void(*GdkInputFunction) (gpointer data,gint source,
GdkInputCondition condition);
void(*GdkDestroyNotify) (gpointer data);
gintgdk_input_add (gint source,GdkInputCondition condition,
GdkInputFunction function,gpointer data);
voidgdk_input_remove(gint tag); 

Description

  The functions in this section are used to establish callbacks when some condition becomes true for a file descriptor. They are currently just wrappers around the IO Channel facility.

Details



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



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

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