没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
General
General — Library initialization and miscellaneous functions
GTK 参考手册
Synopsis
#include <gdk/gdk.h>
void gdk_init (gint *argc,
gchar ***argv);
gboolean gdk_init_check (gint *argc,
gchar ***argv);
void gdk_parse_args (gint *argc,
gchar ***argv);
const gchar* gdk_get_display_arg_name (void);
gchar* gdk_set_locale (void);
void gdk_set_sm_client_id (const gchar *sm_client_id);
void gdk_exit (gint error_code);
void gdk_notify_startup_complete (void);
void gdk_notify_startup_complete_with_id (const gchar *startup_id);
const char * gdk_get_program_class (void);
void gdk_set_program_class (const char *program_class);
gchar* gdk_get_display (void);
void gdk_flush (void);
gint gdk_screen_width (void);
gint gdk_screen_height (void);
gint gdk_screen_width_mm (void);
gint gdk_screen_height_mm (void);
GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time_);
enum GdkGrabStatus;
void gdk_pointer_ungrab (guint32 time_);
gboolean gdk_pointer_is_grabbed (void);
void gdk_set_double_click_time (guint msec);
GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
gboolean owner_events,
guint32 time_);
void gdk_keyboard_ungrab (guint32 time_);
void gdk_beep (void);
gboolean gdk_get_use_xshm (void);
void gdk_set_use_xshm (gboolean use_xshm);
void gdk_error_trap_push (void);
gint gdk_error_trap_pop (void);
#define GDK_WINDOWING_X11
#define GDK_WINDOWING_WIN32
Description
This section describes the GDK initialization functions and miscellaneous utility functions.
Details
gdk_init ()
void gdk_init (gint *argc,
gchar ***argv);
Initializes the GDK library and connects to the X server. If initialization fails, a warning message
is output and the application terminates with a call to exit(1).
Any arguments used by GDK are removed from the array and argc and argv are updated
accordingly.
GTK+ initializes GDK in gtk_init() and so this function is not usually needed by GTK+
applications.
argc9: . inout.
argv9: . array length=argc. inout length=argc.
gdk_init_check ()
gboolean gdk_init_check (gint *argc,
gchar ***argv);
Initialize the library for use.
Arguments: "argc" is the number of arguments. "argv" is an array of strings.
Results: "argc" and "argv" are modified to reflect any arguments which were not handled. (Such
arguments should either be handled by the application or dismissed). If initialization fails, returns
FALSE, otherwise TRUE.
Side effects: The library is initialized.
--------------------------------------------------------------
Initializes the GDK library and connects to the X server, returning TRUE on success.
Any arguments used by GDK are removed from the array and argc and argv are updated
accordingly.
GTK+ initializes GDK in gtk_init() and so this function is not usually needed by GTK+
applications.
argc9: . inout.
argv9: . array length=argc. inout length=argc.
Returns9: TRUE if initialization succeeded.
gdk_parse_args ()
void gdk_parse_args (gint *argc,
gchar ***argv);
Parse command line arguments, and store for future use by calls to gdk_display_open().
Any arguments used by GDK are removed from the array and argc and argv are updated
accordingly.
You shouldn't call this function explicitely if you are using gtk_init(), gtk_init_check(), gdk_init(),
or gdk_init_check().
argc9: the number of command line arguments.
argv9: the array of command line arguments.
Since 2.2
gdk_get_display_arg_name ()
const gchar* gdk_get_display_arg_name (void);
Gets the display name specified in the command line arguments passed to gdk_init() or
gdk_parse_args(), if any.
Returns9:
the display name, if specified explicitely, otherwise NULL this string is owned by GTK+
and must not be modified or freed.
Since 2.2
gdk_set_locale ()
gchar* gdk_set_locale (void);
Initializes the support for internationalization by calling the setlocale() system call. This function
is called by gtk_set_locale() and so GTK+ applications should use that instead.
The locale to use is determined by the LANG environment variable, so to run an application in a
certain locale you can do something like this:
export LANG="fr"
... run application ...
If the locale is not supported by X then it is reset to the standard "C" locale.
Returns9: the resulting locale.
gdk_set_sm_client_id ()
void gdk_set_sm_client_id (const gchar *sm_client_id);
Sets the SM_CLIENT_ID property on the application's leader window so that the window
manager can save the application's state using the X11R6 ICCCM session management protocol.
See the X Session Management Library documentation for more information on session
management and the Inter-Client Communication Conventions Manual (ICCCM) for information
on the WM_CLIENT_LEADER property. (Both documents are part of the X Window System
distribution.)
sm_client_id9:
the client id assigned by the session manager when the connection was opened, or
NULL to remove the property.
gdk_exit ()
void gdk_exit (gint error_code);
Warning
gdk_exit is deprecated and should not be used in newly-written code.
Exits the application using the exit() system call.
This routine is provided mainly for backwards compatibility, since it used to perform tasks
necessary to exit the application cleanly. Those tasks are now performed in a function which is
automatically called on exit (via the use of g_atexit()).
error_code9: the error code to pass to the exit() call.
gdk_notify_startup_complete ()
void gdk_notify_startup_complete (void);
Indicates to the GUI environment that the application has finished loading. If the applications
opens windows, this function is normally called after opening the application's initial set of
windows.
GTK+ will call this function automatically after opening the first GtkWindow unless
gtk_window_set_auto_startup_notification() is called to disable that feature.
Since 2.2
gdk_notify_startup_complete_with_id ()
void gdk_notify_startup_complete_with_id (const gchar *startup_id);
Indicates to the GUI environment that the application has finished loading, using a given
identifier.
GTK+ will call this function automatically for GtkWindow with custom startup-notification
identifier unless gtk_window_set_auto_startup_notification() is called to disable that feature.
startup_id9: a startup-notification identifier, for which notification process should be completed
Since 2.12
gdk_get_program_class ()
const char * gdk_get_program_class (void);
Gets the program class. Unless the program class has explicitly been set with
gdk_set_program_class() or with the --class commandline option, the default value is the program
name (determined with g_get_prgname()) with the first character converted to uppercase.
Returns9: the program class.
gdk_set_program_class ()
void gdk_set_program_class (const char *program_class);
Sets the program class. The X11 backend uses the program class to set the class name part of the
WM_CLASS property on toplevel windows; see the ICCCM.
program_class9: a string.
gdk_get_display ()
gchar* gdk_get_display (void);
Gets the name of the display, which usually comes from the DISPLAY environment variable or
the --display command line option.
Returns9: the name of the display.
gdk_flush ()
void gdk_flush (void);
Flushes the X output buffer and waits until all requests have been processed by the server. This is
rarely needed by applications. It's main use is for trapping X errors with gdk_error_trap_push()
and gdk_error_trap_pop().
gdk_screen_width ()
gint gdk_screen_width (void);
Returns the width of the default screen in pixels.
Returns9: the width of the default screen in pixels.
gdk_screen_height ()
gint gdk_screen_height (void);
Returns the height of the default screen in pixels.
Returns9: the height of the default screen in pixels.
gdk_screen_width_mm ()
gint gdk_screen_width_mm (void);
Returns the width of the default screen in millimeters. Note that on many X servers this value will
not be correct.
Returns9: the width of the default screen in millimeters, though it is not always correct.
gdk_screen_height_mm ()
gint gdk_screen_height_mm (void);
Returns the height of the default screen in millimeters. Note that on many X servers this value will
not be correct.
Returns9: the height of the default screen in millimeters, though it is not always correct.
gdk_pointer_grab ()
GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
剩余63页未读,继续阅读
资源评论
jerry0291
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功