📄 gdk.h
字号:
/* GDK - The GIMP Drawing Kit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. *//* * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */#ifndef __GDK_H__#define __GDK_H__#include <gdk/gdktypes.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//* Initialization, exit and events */#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)void gdk_init (gint *argc, gchar ***argv);gboolean gdk_init_check (gint *argc, gchar ***argv);void gdk_exit (gint error_code);gchar* gdk_set_locale (void);/* Push and pop error handlers for X errors */void gdk_error_trap_push (void);gint gdk_error_trap_pop (void);gboolean gdk_events_pending (void);GdkEvent* gdk_event_get (void);GdkEvent* gdk_event_peek (void);GdkEvent* gdk_event_get_graphics_expose (GdkWindow *window);void gdk_event_put (GdkEvent *event);GdkEvent* gdk_event_copy (GdkEvent *event);void gdk_event_free (GdkEvent *event);guint32 gdk_event_get_time (GdkEvent *event);void gdk_event_handler_set (GdkEventFunc func, gpointer data, GDestroyNotify notify);void gdk_set_show_events (gint show_events);void gdk_set_use_xshm (gint use_xshm);gint gdk_get_show_events (void);gint gdk_get_use_xshm (void);gchar* gdk_get_display (void);guint32 gdk_time_get (void);guint32 gdk_timer_get (void);void gdk_timer_set (guint32 milliseconds);void gdk_timer_enable (void);void gdk_timer_disable (void);gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GdkDestroyNotify destroy);gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data);void gdk_input_remove (gint tag);gint gdk_pointer_grab (GdkWindow * window, gint owner_events, GdkEventMask event_mask, GdkWindow * confine_to, GdkCursor * cursor, guint32 time);void gdk_pointer_ungrab (guint32 time);gint gdk_keyboard_grab (GdkWindow * window, gint owner_events, guint32 time);void gdk_keyboard_ungrab (guint32 time);gint gdk_pointer_is_grabbed (void);gint gdk_screen_width (void);gint gdk_screen_height (void);gint gdk_screen_width_mm (void);gint gdk_screen_height_mm (void);void gdk_flush (void);void gdk_beep (void);void gdk_key_repeat_disable (void);void gdk_key_repeat_restore (void);/* Visuals */gint gdk_visual_get_best_depth (void);GdkVisualType gdk_visual_get_best_type (void);GdkVisual* gdk_visual_get_system (void);GdkVisual* gdk_visual_get_best (void);GdkVisual* gdk_visual_get_best_with_depth (gint depth);GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);GdkVisual* gdk_visual_get_best_with_both (gint depth, GdkVisualType visual_type);/* Actually, these are no-ops... */GdkVisual* gdk_visual_ref (GdkVisual *visual);void gdk_visual_unref (GdkVisual *visual);void gdk_query_depths (gint **depths, gint *count);void gdk_query_visual_types (GdkVisualType **visual_types, gint *count);GList* gdk_list_visuals (void);/* Windows */GdkWindow* gdk_window_new (GdkWindow *parent, GdkWindowAttr *attributes, gint attributes_mask);void gdk_window_destroy (GdkWindow *window);GdkWindow* gdk_window_ref (GdkWindow *window);void gdk_window_unref (GdkWindow *window);GdkWindow* gdk_window_at_pointer (gint *win_x, gint *win_y);void gdk_window_show (GdkWindow *window);void gdk_window_hide (GdkWindow *window);void gdk_window_withdraw (GdkWindow *window);void gdk_window_move (GdkWindow *window, gint x, gint y);void gdk_window_resize (GdkWindow *window, gint width, gint height);void gdk_window_move_resize (GdkWindow *window, gint x, gint y, gint width, gint height);void gdk_window_reparent (GdkWindow *window, GdkWindow *new_parent, gint x, gint y);void gdk_window_clear (GdkWindow *window);void gdk_window_clear_area (GdkWindow *window, gint x, gint y, gint width, gint height);void gdk_window_clear_area_e(GdkWindow *window, gint x, gint y, gint width, gint height);void gdk_window_copy_area (GdkWindow *window, GdkGC *gc, gint x, gint y, GdkWindow *source_window, gint source_x, gint source_y, gint width, gint height);void gdk_window_raise (GdkWindow *window);void gdk_window_lower (GdkWindow *window);void gdk_window_set_user_data (GdkWindow *window, gpointer user_data);void gdk_window_set_override_redirect(GdkWindow *window, gboolean override_redirect);void gdk_window_add_filter (GdkWindow *window, GdkFilterFunc function, gpointer data);void gdk_window_remove_filter (GdkWindow *window, GdkFilterFunc function, gpointer data);/* * This allows for making shaped (partially transparent) windows * - cool feature, needed for Drag and Drag for example. * The shape_mask can be the mask * from gdk_pixmap_create_from_xpm. Stefan Wille */void gdk_window_shape_combine_mask (GdkWindow *window, GdkBitmap *shape_mask, gint offset_x, gint offset_y);/* * This routine allows you to quickly take the shapes of all the child windows * of a window and use their shapes as the shape mask for this window - useful * for container windows that dont want to look like a big box * * - Raster */void gdk_window_set_child_shapes (GdkWindow *window);/* * This routine allows you to merge (ie ADD) child shapes to your * own window's shape keeping its current shape and ADDING the shild * shapes to it. * * - Raster */void gdk_window_merge_child_shapes (GdkWindow *window);/* * Check if a window has been shown, and whether all it's * parents up to a toplevel have been shown, respectively. * Note that a window that is_viewable below is not necessarily * viewable in the X sense. */gboolean gdk_window_is_visible (GdkWindow *window);gboolean gdk_window_is_viewable (GdkWindow *window);/* Set static bit gravity on the parent, and static * window gravity on all children. */gboolean gdk_window_set_static_gravities (GdkWindow *window, gboolean use_static); /* * The following function adds a global filter for all client * messages of type message_type */void gdk_add_client_message_filter (GdkAtom message_type, GdkFilterFunc func, gpointer data);/* Drag and Drop */GdkDragContext * gdk_drag_context_new (void);void gdk_drag_context_ref (GdkDragContext *context);void gdk_drag_context_unref (GdkDragContext *context);/* Destination side */void gdk_drag_status (GdkDragContext *context, GdkDragAction action, guint32 time);void gdk_drop_reply (GdkDragContext *context, gboolean ok, guint32 time);void gdk_drop_finish (GdkDragContext *context, gboolean success, guint32 time);GdkAtom gdk_drag_get_selection (GdkDragContext *context);/* Source side */GdkDragContext * gdk_drag_begin (GdkWindow *window, GList *targets);guint32 gdk_drag_get_protocol (guint32 xid, GdkDragProtocol *protocol);void gdk_drag_find_window (GdkDragContext *context, GdkWindow *drag_window, gint x_root, gint y_root, GdkWindow **dest_window, GdkDragProtocol *protocol);gboolean gdk_drag_motion (GdkDragContext *context, GdkWindow *dest_window, GdkDragProtocol protocol, gint x_root, gint y_root, GdkDragAction suggested_action, GdkDragAction possible_actions, guint32 time);void gdk_drag_drop (GdkDragContext *context, guint32 time);void gdk_drag_abort (GdkDragContext *context, guint32 time);GdkAtom gdk_drag_get_selection (GdkDragContext *context);/* GdkWindow */void gdk_window_set_hints (GdkWindow *window, gint x, gint y, gint min_width, gint min_height, gint max_width, gint max_height, gint flags);void gdk_window_set_geometry_hints (GdkWindow *window, GdkGeometry *geometry, GdkWindowHints flags);void gdk_set_sm_client_id (const gchar *sm_client_id);void gdk_window_set_title (GdkWindow *window, const gchar *title);void gdk_window_set_role (GdkWindow *window, const gchar *role);void gdk_window_set_transient_for (GdkWindow *window, GdkWindow *leader);void gdk_window_set_background (GdkWindow *window, GdkColor *color);void gdk_window_set_back_pixmap (GdkWindow *window, GdkPixmap *pixmap, gint parent_relative);void gdk_window_set_cursor (GdkWindow *window, GdkCursor *cursor);void gdk_window_set_colormap (GdkWindow *window, GdkColormap *colormap);void gdk_window_get_user_data (GdkWindow *window, gpointer *data);void gdk_window_get_geometry (GdkWindow *window, gint *x, gint *y, gint *width,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -