forked from AuroraMiddleware/gtk
Seal gdk
Add G_SEAL annotation for struct members, and add accessors for the (useful) fields. Patch based on work by Garrett Regier, see bug #592580.
This commit is contained in:
parent
57754edef6
commit
50a72eda2d
@ -55,6 +55,8 @@ gdk_error_trap_pop
|
|||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
GDK_WINDOWING_X11
|
GDK_WINDOWING_X11
|
||||||
GDK_WINDOWING_WIN32
|
GDK_WINDOWING_WIN32
|
||||||
|
GDK_WINDOWING_QUARTZ
|
||||||
|
GDK_WINDOWING_DIRECTFB
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GDK_TYPE_GRAB_STATUS
|
GDK_TYPE_GRAB_STATUS
|
||||||
@ -282,6 +284,15 @@ gdk_image_new
|
|||||||
GdkImageType
|
GdkImageType
|
||||||
gdk_image_get_colormap
|
gdk_image_get_colormap
|
||||||
gdk_image_set_colormap
|
gdk_image_set_colormap
|
||||||
|
gdk_image_get_bits_per_pixel
|
||||||
|
gdk_image_get_bytes_per_pixel
|
||||||
|
gdk_image_get_bytes_per_line
|
||||||
|
gdk_image_get_byte_order
|
||||||
|
gdk_image_get_depth
|
||||||
|
gdk_image_get_height
|
||||||
|
gdk_image_get_image_type
|
||||||
|
gdk_image_get_visual
|
||||||
|
gdk_image_get_width
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
gdk_image_put_pixel
|
gdk_image_put_pixel
|
||||||
@ -571,7 +582,14 @@ GdkByteOrder
|
|||||||
gdk_query_depths
|
gdk_query_depths
|
||||||
gdk_query_visual_types
|
gdk_query_visual_types
|
||||||
gdk_list_visuals
|
gdk_list_visuals
|
||||||
|
gdk_visual_get_bits_per_rgb
|
||||||
|
gdk_visual_get_blue_pixel_details
|
||||||
|
gdk_visual_get_byte_order
|
||||||
|
gdk_visual_get_colormap_size
|
||||||
|
gdk_visual_get_depth
|
||||||
|
gdk_visual_get_green_pixel_details
|
||||||
|
gdk_visual_get_red_pixel_details
|
||||||
|
gdk_visual_get_visual_type
|
||||||
gdk_visual_get_best_depth
|
gdk_visual_get_best_depth
|
||||||
gdk_visual_get_best_type
|
gdk_visual_get_best_type
|
||||||
gdk_visual_get_system
|
gdk_visual_get_system
|
||||||
@ -619,6 +637,8 @@ gdk_window_hide
|
|||||||
gdk_window_is_destroyed
|
gdk_window_is_destroyed
|
||||||
gdk_window_is_visible
|
gdk_window_is_visible
|
||||||
gdk_window_is_viewable
|
gdk_window_is_viewable
|
||||||
|
gdk_window_is_input_only
|
||||||
|
gdk_window_is_shaped
|
||||||
gdk_window_get_state
|
gdk_window_get_state
|
||||||
gdk_window_withdraw
|
gdk_window_withdraw
|
||||||
gdk_window_iconify
|
gdk_window_iconify
|
||||||
@ -633,6 +653,7 @@ gdk_window_set_keep_above
|
|||||||
gdk_window_set_keep_below
|
gdk_window_set_keep_below
|
||||||
gdk_window_set_opacity
|
gdk_window_set_opacity
|
||||||
gdk_window_set_composited
|
gdk_window_set_composited
|
||||||
|
gdk_window_get_composited
|
||||||
gdk_window_move
|
gdk_window_move
|
||||||
gdk_window_resize
|
gdk_window_resize
|
||||||
gdk_window_move_resize
|
gdk_window_move_resize
|
||||||
@ -677,7 +698,9 @@ gdk_window_configure_finished
|
|||||||
gdk_window_set_user_data
|
gdk_window_set_user_data
|
||||||
gdk_window_set_override_redirect
|
gdk_window_set_override_redirect
|
||||||
gdk_window_set_accept_focus
|
gdk_window_set_accept_focus
|
||||||
|
gdk_window_get_accept_focus
|
||||||
gdk_window_set_focus_on_map
|
gdk_window_set_focus_on_map
|
||||||
|
gdk_window_get_focus_on_map
|
||||||
gdk_window_add_filter
|
gdk_window_add_filter
|
||||||
gdk_window_remove_filter
|
gdk_window_remove_filter
|
||||||
GdkFilterFunc
|
GdkFilterFunc
|
||||||
@ -694,7 +717,9 @@ gdk_window_merge_child_input_shapes
|
|||||||
gdk_window_set_static_gravities
|
gdk_window_set_static_gravities
|
||||||
gdk_window_set_title
|
gdk_window_set_title
|
||||||
gdk_window_set_background
|
gdk_window_set_background
|
||||||
|
gdk_window_get_background
|
||||||
gdk_window_set_back_pixmap
|
gdk_window_set_back_pixmap
|
||||||
|
gdk_window_get_back_pixmap
|
||||||
GDK_PARENT_RELATIVE
|
GDK_PARENT_RELATIVE
|
||||||
gdk_window_set_cursor
|
gdk_window_set_cursor
|
||||||
gdk_window_get_cursor
|
gdk_window_get_cursor
|
||||||
@ -703,6 +728,7 @@ gdk_window_get_geometry
|
|||||||
gdk_window_set_geometry_hints
|
gdk_window_set_geometry_hints
|
||||||
gdk_window_set_icon_list
|
gdk_window_set_icon_list
|
||||||
gdk_window_set_modal_hint
|
gdk_window_set_modal_hint
|
||||||
|
gdk_window_get_modal_hint
|
||||||
gdk_window_set_type_hint
|
gdk_window_set_type_hint
|
||||||
gdk_window_get_type_hint
|
gdk_window_get_type_hint
|
||||||
gdk_window_set_skip_taskbar_hint
|
gdk_window_set_skip_taskbar_hint
|
||||||
@ -1010,11 +1036,17 @@ GdkDeviceKey
|
|||||||
GdkDeviceAxis
|
GdkDeviceAxis
|
||||||
GdkAxisUse
|
GdkAxisUse
|
||||||
gdk_devices_list
|
gdk_devices_list
|
||||||
|
gdk_device_get_name
|
||||||
gdk_device_set_source
|
gdk_device_set_source
|
||||||
|
gdk_device_get_source
|
||||||
gdk_device_set_mode
|
gdk_device_set_mode
|
||||||
|
gdk_device_get_mode
|
||||||
gdk_device_set_key
|
gdk_device_set_key
|
||||||
|
gdk_device_get_key
|
||||||
gdk_device_set_axis_use
|
gdk_device_set_axis_use
|
||||||
|
gdk_device_get_axis_use
|
||||||
gdk_device_get_core_pointer
|
gdk_device_get_core_pointer
|
||||||
|
gdk_device_get_has_cursor
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
gdk_device_get_state
|
gdk_device_get_state
|
||||||
@ -1204,6 +1236,10 @@ GdkDragContext
|
|||||||
GdkDragAction
|
GdkDragAction
|
||||||
gdk_drag_status
|
gdk_drag_status
|
||||||
gdk_drag_drop_succeeded
|
gdk_drag_drop_succeeded
|
||||||
|
gdk_drag_context_get_action
|
||||||
|
gdk_drag_context_get_actions
|
||||||
|
gdk_drag_context_get_suggested_action
|
||||||
|
gdk_drag_context_list_targets
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GDK_DRAG_CONTEXT
|
GDK_DRAG_CONTEXT
|
||||||
|
@ -391,7 +391,14 @@ Removes the X error trap installed with gdk_error_trap_push().
|
|||||||
|
|
||||||
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
||||||
<para>
|
<para>
|
||||||
This macro is defined if GDK is configured to use the X backend.
|
This macro is defined if GDK is configured to use the X11 backend.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
|
||||||
|
<para>
|
||||||
|
This macro is defined if GDK is configured to use the win32 backend.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
@ -371,7 +371,13 @@ gdk_cursor_get_image
|
|||||||
#if IN_FILE(__GDK_INPUT_C__)
|
#if IN_FILE(__GDK_INPUT_C__)
|
||||||
gdk_device_free_history
|
gdk_device_free_history
|
||||||
gdk_device_get_axis
|
gdk_device_get_axis
|
||||||
|
gdk_device_get_axis_use
|
||||||
|
gdk_device_get_has_cursor
|
||||||
gdk_device_get_history
|
gdk_device_get_history
|
||||||
|
gdk_device_get_key
|
||||||
|
gdk_device_get_mode
|
||||||
|
gdk_device_get_name
|
||||||
|
gdk_device_get_source
|
||||||
gdk_device_get_type G_GNUC_CONST
|
gdk_device_get_type G_GNUC_CONST
|
||||||
gdk_device_set_axis_use
|
gdk_device_set_axis_use
|
||||||
gdk_device_set_key
|
gdk_device_set_key
|
||||||
@ -519,6 +525,10 @@ gdk_drop_reply
|
|||||||
|
|
||||||
#if IN_HEADER(__GDK_DND_H__)
|
#if IN_HEADER(__GDK_DND_H__)
|
||||||
#if IN_FILE(__GDK_DND_C__)
|
#if IN_FILE(__GDK_DND_C__)
|
||||||
|
gdk_drag_context_get_action
|
||||||
|
gdk_drag_context_get_actions
|
||||||
|
gdk_drag_context_get_suggested_action
|
||||||
|
gdk_drag_context_list_targets
|
||||||
gdk_drag_find_window
|
gdk_drag_find_window
|
||||||
gdk_drag_get_protocol
|
gdk_drag_get_protocol
|
||||||
#endif
|
#endif
|
||||||
@ -644,14 +654,20 @@ gdk_window_resize
|
|||||||
gdk_window_move_resize
|
gdk_window_move_resize
|
||||||
gdk_window_scroll
|
gdk_window_scroll
|
||||||
gdk_window_move_region
|
gdk_window_move_region
|
||||||
|
gdk_window_get_accept_focus
|
||||||
|
gdk_window_get_back_pixmap
|
||||||
|
gdk_window_get_background
|
||||||
|
gdk_window_get_composited
|
||||||
|
gdk_window_get_cursor
|
||||||
|
gdk_window_get_deskrelative_origin
|
||||||
|
gdk_window_get_focus_on_map
|
||||||
|
gdk_window_get_geometry
|
||||||
|
gdk_window_get_modal_hint
|
||||||
|
gdk_window_get_origin
|
||||||
|
gdk_window_get_root_coords
|
||||||
gdk_window_set_background
|
gdk_window_set_background
|
||||||
gdk_window_set_back_pixmap
|
gdk_window_set_back_pixmap
|
||||||
gdk_window_set_cursor
|
gdk_window_set_cursor
|
||||||
gdk_window_get_cursor
|
|
||||||
gdk_window_get_geometry
|
|
||||||
gdk_window_get_origin
|
|
||||||
gdk_window_get_root_coords
|
|
||||||
gdk_window_get_deskrelative_origin
|
|
||||||
gdk_window_shape_combine_mask
|
gdk_window_shape_combine_mask
|
||||||
gdk_window_shape_combine_region
|
gdk_window_shape_combine_region
|
||||||
gdk_window_set_child_shapes
|
gdk_window_set_child_shapes
|
||||||
@ -690,10 +706,12 @@ gdk_window_get_effective_toplevel
|
|||||||
gdk_window_get_update_area
|
gdk_window_get_update_area
|
||||||
gdk_window_get_user_data
|
gdk_window_get_user_data
|
||||||
gdk_window_get_window_type
|
gdk_window_get_window_type
|
||||||
gdk_window_is_destroyed
|
|
||||||
gdk_window_invalidate_maybe_recurse
|
gdk_window_invalidate_maybe_recurse
|
||||||
gdk_window_invalidate_rect
|
gdk_window_invalidate_rect
|
||||||
gdk_window_invalidate_region
|
gdk_window_invalidate_region
|
||||||
|
gdk_window_is_destroyed
|
||||||
|
gdk_window_is_input_only
|
||||||
|
gdk_window_is_shaped
|
||||||
gdk_window_is_viewable
|
gdk_window_is_viewable
|
||||||
gdk_window_is_visible
|
gdk_window_is_visible
|
||||||
gdk_window_object_get_type G_GNUC_CONST
|
gdk_window_object_get_type G_GNUC_CONST
|
||||||
@ -785,8 +803,17 @@ gdk_window_configure_finished
|
|||||||
|
|
||||||
#if IN_HEADER(__GDK_IMAGE_H__)
|
#if IN_HEADER(__GDK_IMAGE_H__)
|
||||||
#if IN_FILE(__GDK_IMAGE_C__)
|
#if IN_FILE(__GDK_IMAGE_C__)
|
||||||
gdk_image_set_colormap
|
gdk_image_get_bits_per_pixel
|
||||||
|
gdk_image_get_bytes_per_pixel
|
||||||
|
gdk_image_get_bytes_per_line
|
||||||
|
gdk_image_get_byte_order
|
||||||
gdk_image_get_colormap
|
gdk_image_get_colormap
|
||||||
|
gdk_image_get_depth
|
||||||
|
gdk_image_get_height
|
||||||
|
gdk_image_get_image_type
|
||||||
|
gdk_image_get_visual
|
||||||
|
gdk_image_get_width
|
||||||
|
gdk_image_set_colormap
|
||||||
gdk_image_new
|
gdk_image_new
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -854,7 +881,15 @@ gdk_keyval_name G_GNUC_CONST
|
|||||||
#if IN_HEADER(__GDK_VISUAL_H__)
|
#if IN_HEADER(__GDK_VISUAL_H__)
|
||||||
#if IN_FILE(__GDK_VISUAL_C__)
|
#if IN_FILE(__GDK_VISUAL_C__)
|
||||||
gdk_list_visuals
|
gdk_list_visuals
|
||||||
|
gdk_visual_get_bits_per_rgb
|
||||||
|
gdk_visual_get_blue_pixel_details
|
||||||
|
gdk_visual_get_byte_order
|
||||||
|
gdk_visual_get_colormap_size
|
||||||
|
gdk_visual_get_depth
|
||||||
|
gdk_visual_get_green_pixel_details
|
||||||
|
gdk_visual_get_red_pixel_details
|
||||||
gdk_visual_get_system
|
gdk_visual_get_system
|
||||||
|
gdk_visual_get_visual_type
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -71,13 +71,13 @@ struct _GdkColormap
|
|||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
gint size;
|
gint GSEAL (size);
|
||||||
GdkColor *colors;
|
GdkColor *GSEAL (colors);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GdkVisual *visual;
|
GdkVisual *GSEAL (visual);
|
||||||
|
|
||||||
gpointer windowing_data;
|
gpointer GSEAL (windowing_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkColormapClass
|
struct _GdkColormapClass
|
||||||
|
@ -126,9 +126,9 @@ typedef enum
|
|||||||
|
|
||||||
struct _GdkCursor
|
struct _GdkCursor
|
||||||
{
|
{
|
||||||
GdkCursorType type;
|
GdkCursorType GSEAL (type);
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
guint ref_count;
|
guint GSEAL (ref_count);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cursors
|
/* Cursors
|
||||||
|
@ -75,34 +75,34 @@ struct _GdkDisplay
|
|||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GList *queued_events;
|
GList *GSEAL (queued_events);
|
||||||
GList *queued_tail;
|
GList *GSEAL (queued_tail);
|
||||||
|
|
||||||
/* Information for determining if the latest button click
|
/* Information for determining if the latest button click
|
||||||
* is part of a double-click or triple-click
|
* is part of a double-click or triple-click
|
||||||
*/
|
*/
|
||||||
guint32 button_click_time[2]; /* The last 2 button click times. */
|
guint32 GSEAL (button_click_time[2]); /* The last 2 button click times. */
|
||||||
GdkWindow *button_window[2]; /* The last 2 windows to receive button presses. */
|
GdkWindow *GSEAL (button_window[2]); /* The last 2 windows to receive button presses. */
|
||||||
gint button_number[2]; /* The last 2 buttons to be pressed. */
|
gint GSEAL (button_number[2]); /* The last 2 buttons to be pressed. */
|
||||||
|
|
||||||
guint double_click_time; /* Maximum time between clicks in msecs */
|
guint GSEAL (double_click_time); /* Maximum time between clicks in msecs */
|
||||||
GdkDevice *core_pointer; /* Core pointer device */
|
GdkDevice *GSEAL (core_pointer); /* Core pointer device */
|
||||||
|
|
||||||
const GdkDisplayPointerHooks *pointer_hooks; /* Current hooks for querying pointer */
|
const GdkDisplayPointerHooks *GSEAL (pointer_hooks); /* Current hooks for querying pointer */
|
||||||
|
|
||||||
guint closed : 1; /* Whether this display has been closed */
|
guint GSEAL (closed) : 1; /* Whether this display has been closed */
|
||||||
guint ignore_core_events : 1; /* Don't send core motion and button event */
|
guint GSEAL (ignore_core_events) : 1; /* Don't send core motion and button event */
|
||||||
|
|
||||||
guint double_click_distance; /* Maximum distance between clicks in pixels */
|
guint GSEAL (double_click_distance); /* Maximum distance between clicks in pixels */
|
||||||
gint button_x[2]; /* The last 2 button click positions. */
|
gint GSEAL (button_x[2]); /* The last 2 button click positions. */
|
||||||
gint button_y[2];
|
gint GSEAL (button_y[2]);
|
||||||
|
|
||||||
GList *pointer_grabs;
|
GList *GSEAL (pointer_grabs);
|
||||||
GdkKeyboardGrabInfo keyboard_grab;
|
GdkKeyboardGrabInfo GSEAL (keyboard_grab);
|
||||||
GdkPointerWindowInfo pointer_info;
|
GdkPointerWindowInfo GSEAL (pointer_info);
|
||||||
|
|
||||||
/* Last reported event time from server */
|
/* Last reported event time from server */
|
||||||
guint32 last_event_time;
|
guint32 GSEAL (last_event_time);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkDisplayClass
|
struct _GdkDisplayClass
|
||||||
|
73
gdk/gdkdnd.c
73
gdk/gdkdnd.c
@ -77,5 +77,78 @@ gdk_drag_get_protocol (GdkNativeWindow xid,
|
|||||||
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
|
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_drag_context_list_targets:
|
||||||
|
* @context: a #GdkDragContext
|
||||||
|
*
|
||||||
|
* Retrieves the list of targets of the context.
|
||||||
|
*
|
||||||
|
* Return value: a #GList of targets
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GList *
|
||||||
|
gdk_drag_context_list_targets (GdkDragContext *context)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
|
||||||
|
|
||||||
|
return context->targets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_drag_context_get_actions:
|
||||||
|
* @context: a #GdkDragContext
|
||||||
|
*
|
||||||
|
* Determines the bitmask of actions proposed by the source if
|
||||||
|
* gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.
|
||||||
|
*
|
||||||
|
* Return value: the #GdkDragAction flags
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkDragAction
|
||||||
|
gdk_drag_context_get_actions (GdkDragContext *context)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_ACTION_DEFAULT);
|
||||||
|
|
||||||
|
return context->actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_drag_context_get_suggested_action:
|
||||||
|
* @context: a #GdkDragContext
|
||||||
|
*
|
||||||
|
* Determines the suggested drag action of the context.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkDragAction value
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkDragAction
|
||||||
|
gdk_drag_context_get_suggested_action (GdkDragContext *context)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), 0);
|
||||||
|
|
||||||
|
return context->suggested_action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_drag_context_get_action:
|
||||||
|
* @context: a #GdkDragContext
|
||||||
|
*
|
||||||
|
* Determines the action chosen by the drag destination.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkDragAction value
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkDragAction
|
||||||
|
gdk_drag_context_get_action (GdkDragContext *context)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), 0);
|
||||||
|
|
||||||
|
return context->action;
|
||||||
|
}
|
||||||
|
|
||||||
#define __GDK_DND_C__
|
#define __GDK_DND_C__
|
||||||
#include "gdkaliasdef.c"
|
#include "gdkaliasdef.c"
|
||||||
|
30
gdk/gdkdnd.h
30
gdk/gdkdnd.h
@ -77,29 +77,28 @@ struct _GdkDragContext {
|
|||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
GdkDragProtocol protocol;
|
GdkDragProtocol GSEAL (protocol);
|
||||||
|
|
||||||
gboolean is_source;
|
|
||||||
|
|
||||||
GdkWindow *source_window;
|
|
||||||
GdkWindow *dest_window;
|
|
||||||
|
|
||||||
GList *targets;
|
gboolean GSEAL (is_source);
|
||||||
GdkDragAction actions;
|
|
||||||
GdkDragAction suggested_action;
|
GdkWindow *GSEAL (source_window);
|
||||||
GdkDragAction action;
|
GdkWindow *GSEAL (dest_window);
|
||||||
|
|
||||||
guint32 start_time;
|
GList *GSEAL (targets);
|
||||||
|
GdkDragAction GSEAL (actions);
|
||||||
|
GdkDragAction GSEAL (suggested_action);
|
||||||
|
GdkDragAction GSEAL (action);
|
||||||
|
|
||||||
|
guint32 GSEAL (start_time);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
|
||||||
gpointer windowing_data;
|
gpointer GSEAL (windowing_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkDragContextClass {
|
struct _GdkDragContextClass {
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Drag and Drop */
|
/* Drag and Drop */
|
||||||
@ -107,6 +106,11 @@ struct _GdkDragContextClass {
|
|||||||
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
|
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
|
||||||
GdkDragContext * gdk_drag_context_new (void);
|
GdkDragContext * gdk_drag_context_new (void);
|
||||||
|
|
||||||
|
GList *gdk_drag_context_list_targets (GdkDragContext *context);
|
||||||
|
GdkDragAction gdk_drag_context_get_actions (GdkDragContext *context);
|
||||||
|
GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context);
|
||||||
|
GdkDragAction gdk_drag_context_get_action (GdkDragContext *context);
|
||||||
|
|
||||||
/* Destination side */
|
/* Destination side */
|
||||||
|
|
||||||
void gdk_drag_status (GdkDragContext *context,
|
void gdk_drag_status (GdkDragContext *context,
|
||||||
|
10
gdk/gdkgc.h
10
gdk/gdkgc.h
@ -190,12 +190,12 @@ struct _GdkGC
|
|||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
gint clip_x_origin;
|
gint GSEAL (clip_x_origin);
|
||||||
gint clip_y_origin;
|
gint GSEAL (clip_y_origin);
|
||||||
gint ts_x_origin;
|
gint GSEAL (ts_x_origin);
|
||||||
gint ts_y_origin;
|
gint GSEAL (ts_y_origin);
|
||||||
|
|
||||||
GdkColormap *colormap;
|
GdkColormap *GSEAL (colormap);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkGCClass
|
struct _GdkGCClass
|
||||||
|
162
gdk/gdkimage.c
162
gdk/gdkimage.c
@ -81,6 +81,168 @@ gdk_image_get_colormap (GdkImage *image)
|
|||||||
return image->colormap;
|
return image->colormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_image_type:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the type of a given image.
|
||||||
|
*
|
||||||
|
* Return value: the #GdkImageType of the image
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkImageType
|
||||||
|
gdk_image_get_image_type (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_visual:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the visual that was used to create the image.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkVisual
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkVisual *
|
||||||
|
gdk_image_get_visual (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), NULL);
|
||||||
|
|
||||||
|
return image->visual;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_byte_order:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the byte order of the image.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkVisual
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkByteOrder
|
||||||
|
gdk_image_get_byte_order (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->byte_order;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_width:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the width of the image.
|
||||||
|
*
|
||||||
|
* Return value: the width
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
gint
|
||||||
|
gdk_image_get_width (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_height:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the height of the image.
|
||||||
|
*
|
||||||
|
* Return value: the height
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
gint
|
||||||
|
gdk_image_get_height (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_depth:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the depth of the image.
|
||||||
|
*
|
||||||
|
* Return value: the depth
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
guint16
|
||||||
|
gdk_image_get_depth (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_bytes_per_pixel:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the number of bytes per pixel of the image.
|
||||||
|
*
|
||||||
|
* Return value: the bytes per pixel
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
guint16
|
||||||
|
gdk_image_get_bytes_per_pixel (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->bpp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_bytes_per_line:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the number of bytes per line of the image.
|
||||||
|
*
|
||||||
|
* Return value: the bytes per line
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
guint16
|
||||||
|
gdk_image_get_bytes_per_line (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->bpl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_image_get_bits_per_pixel:
|
||||||
|
* @image: a #GdkImage
|
||||||
|
*
|
||||||
|
* Determines the number of bits per pixel of the image.
|
||||||
|
*
|
||||||
|
* Return value: the bits per pixel
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
guint16
|
||||||
|
gdk_image_get_bits_per_pixel (GdkImage *image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
|
||||||
|
|
||||||
|
return image->bits_per_pixel;
|
||||||
|
}
|
||||||
|
|
||||||
/* We have N_REGION GDK_SCRATCH_IMAGE_WIDTH x GDK_SCRATCH_IMAGE_HEIGHT regions divided
|
/* We have N_REGION GDK_SCRATCH_IMAGE_WIDTH x GDK_SCRATCH_IMAGE_HEIGHT regions divided
|
||||||
* up between n_images different images. possible_n_images gives
|
* up between n_images different images. possible_n_images gives
|
||||||
* various divisors of N_REGIONS. The reason for allowing this
|
* various divisors of N_REGIONS. The reason for allowing this
|
||||||
|
@ -68,21 +68,21 @@ struct _GdkImage
|
|||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
GdkImageType type; /* read only. */
|
GdkImageType GSEAL (type); /* read only. */
|
||||||
GdkVisual *visual; /* read only. visual used to create the image */
|
GdkVisual *GSEAL (visual); /* read only. visual used to create the image */
|
||||||
GdkByteOrder byte_order; /* read only. */
|
GdkByteOrder GSEAL (byte_order); /* read only. */
|
||||||
gint width; /* read only. */
|
gint GSEAL (width); /* read only. */
|
||||||
gint height; /* read only. */
|
gint GSEAL (height); /* read only. */
|
||||||
guint16 depth; /* read only. */
|
guint16 GSEAL (depth); /* read only. */
|
||||||
guint16 bpp; /* read only. bytes per pixel */
|
guint16 GSEAL (bpp); /* read only. bytes per pixel */
|
||||||
guint16 bpl; /* read only. bytes per line */
|
guint16 GSEAL (bpl); /* read only. bytes per line */
|
||||||
guint16 bits_per_pixel; /* read only. bits per pixel */
|
guint16 GSEAL (bits_per_pixel); /* read only. bits per pixel */
|
||||||
gpointer mem;
|
gpointer GSEAL (mem);
|
||||||
|
|
||||||
GdkColormap *colormap; /* read only. */
|
GdkColormap *GSEAL (colormap); /* read only. */
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer windowing_data; /* read only. */
|
gpointer GSEAL (windowing_data); /* read only. */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkImageClass
|
struct _GdkImageClass
|
||||||
@ -109,6 +109,16 @@ void gdk_image_set_colormap (GdkImage *image,
|
|||||||
GdkColormap *colormap);
|
GdkColormap *colormap);
|
||||||
GdkColormap* gdk_image_get_colormap (GdkImage *image);
|
GdkColormap* gdk_image_get_colormap (GdkImage *image);
|
||||||
|
|
||||||
|
GdkImageType gdk_image_get_image_type (GdkImage *image);
|
||||||
|
GdkVisual *gdk_image_get_visual (GdkImage *image);
|
||||||
|
GdkByteOrder gdk_image_get_byte_order (GdkImage *image);
|
||||||
|
gint gdk_image_get_width (GdkImage *image);
|
||||||
|
gint gdk_image_get_height (GdkImage *image);
|
||||||
|
guint16 gdk_image_get_depth (GdkImage *image);
|
||||||
|
guint16 gdk_image_get_bytes_per_pixel(GdkImage *image);
|
||||||
|
guint16 gdk_image_get_bytes_per_line (GdkImage *image);
|
||||||
|
guint16 gdk_image_get_bits_per_pixel (GdkImage *image);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -100,16 +100,16 @@ struct _GdkDevice
|
|||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
/* All fields are read-only */
|
/* All fields are read-only */
|
||||||
|
|
||||||
gchar *name;
|
gchar *GSEAL (name);
|
||||||
GdkInputSource source;
|
GdkInputSource GSEAL (source);
|
||||||
GdkInputMode mode;
|
GdkInputMode GSEAL (mode);
|
||||||
gboolean has_cursor; /* TRUE if the X pointer follows device motion */
|
gboolean GSEAL (has_cursor); /* TRUE if the X pointer follows device motion */
|
||||||
|
|
||||||
gint num_axes;
|
gint GSEAL (num_axes);
|
||||||
GdkDeviceAxis *axes;
|
GdkDeviceAxis *GSEAL (axes);
|
||||||
|
|
||||||
gint num_keys;
|
gint GSEAL (num_keys);
|
||||||
GdkDeviceKey *keys;
|
GdkDeviceKey *GSEAL (keys);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* We don't allocate each coordinate this big, but we use it to
|
/* We don't allocate each coordinate this big, but we use it to
|
||||||
@ -130,6 +130,18 @@ GType gdk_device_get_type (void) G_GNUC_CONST;
|
|||||||
GList * gdk_devices_list (void);
|
GList * gdk_devices_list (void);
|
||||||
#endif /* GDK_MULTIHEAD_SAFE */
|
#endif /* GDK_MULTIHEAD_SAFE */
|
||||||
|
|
||||||
|
G_CONST_RETURN gchar *gdk_device_get_name (GdkDevice *device);
|
||||||
|
GdkInputSource gdk_device_get_source (GdkDevice *device);
|
||||||
|
GdkInputMode gdk_device_get_mode (GdkDevice *device);
|
||||||
|
gboolean gdk_device_get_has_cursor (GdkDevice *device);
|
||||||
|
|
||||||
|
void gdk_device_get_key (GdkDevice *device,
|
||||||
|
guint index,
|
||||||
|
guint *keyval,
|
||||||
|
GdkModifierType *modifiers);
|
||||||
|
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
|
||||||
|
guint index);
|
||||||
|
|
||||||
/* Functions to configure a device */
|
/* Functions to configure a device */
|
||||||
void gdk_device_set_source (GdkDevice *device,
|
void gdk_device_set_source (GdkDevice *device,
|
||||||
GdkInputSource source);
|
GdkInputSource source);
|
||||||
|
@ -66,7 +66,7 @@ typedef struct _GdkKeymapClass GdkKeymapClass;
|
|||||||
struct _GdkKeymap
|
struct _GdkKeymap
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
GdkDisplay *display;
|
GdkDisplay *GSEAL (display);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkKeymapClass
|
struct _GdkKeymapClass
|
||||||
|
@ -51,9 +51,9 @@ struct _GdkPixmapObject
|
|||||||
{
|
{
|
||||||
GdkDrawable parent_instance;
|
GdkDrawable parent_instance;
|
||||||
|
|
||||||
GdkDrawable *impl; /* window-system-specific delegate object */
|
GdkDrawable *GSEAL (impl); /* window-system-specific delegate object */
|
||||||
|
|
||||||
gint depth;
|
gint GSEAL (depth);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkPixmapObjectClass
|
struct _GdkPixmapObjectClass
|
||||||
|
@ -47,14 +47,14 @@ struct _GdkScreen
|
|||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
guint closed : 1;
|
guint GSEAL (closed) : 1;
|
||||||
|
|
||||||
GdkGC *normal_gcs[32];
|
GdkGC *GSEAL (normal_gcs[32]);
|
||||||
GdkGC *exposure_gcs[32];
|
GdkGC *GSEAL (exposure_gcs[32]);
|
||||||
GdkGC *subwindow_gcs[32];
|
GdkGC *GSEAL (subwindow_gcs[32]);
|
||||||
|
|
||||||
cairo_font_options_t *font_options;
|
cairo_font_options_t *GSEAL (font_options);
|
||||||
double resolution; /* pixels/points scale factor for fonts */
|
double GSEAL (resolution); /* pixels/points scale factor for fonts */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GdkScreenClass
|
struct _GdkScreenClass
|
||||||
|
189
gdk/gdkvisual.c
189
gdk/gdkvisual.c
@ -60,5 +60,194 @@ gdk_visual_get_system (void)
|
|||||||
return gdk_screen_get_system_visual (gdk_screen_get_default());
|
return gdk_screen_get_system_visual (gdk_screen_get_default());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_visual_type:
|
||||||
|
* @visual: A #GdkVisual.
|
||||||
|
*
|
||||||
|
* Returns the type of visual this is (PseudoColor, TrueColor, etc).
|
||||||
|
*
|
||||||
|
* Return value: A #GdkVisualType stating the type of @visual.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
GdkVisualType
|
||||||
|
gdk_visual_get_visual_type (GdkVisual *visual)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_VISUAL (visual), 0);
|
||||||
|
|
||||||
|
return visual->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_depth:
|
||||||
|
* @visual: A #GdkVisual.
|
||||||
|
*
|
||||||
|
* Returns the bit depth of this visual.
|
||||||
|
*
|
||||||
|
* Return value: The bit depth of this visual.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gint
|
||||||
|
gdk_visual_get_depth (GdkVisual *visual)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_VISUAL (visual), 0);
|
||||||
|
|
||||||
|
return visual->depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_byte_order:
|
||||||
|
* @visual: A #GdkVisual.
|
||||||
|
*
|
||||||
|
* Returns the byte order of this visual.
|
||||||
|
*
|
||||||
|
* Return value: A #GdkByteOrder stating the byte order of @visual.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
GdkByteOrder
|
||||||
|
gdk_visual_get_byte_order (GdkVisual *visual)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_VISUAL (visual), 0);
|
||||||
|
|
||||||
|
return visual->byte_order;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_colormap_size:
|
||||||
|
* @visual: A #GdkVisual.
|
||||||
|
*
|
||||||
|
* Returns the size of a colormap for this visual.
|
||||||
|
*
|
||||||
|
* Return value: The size of a colormap that is suitable for @visual.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gint
|
||||||
|
gdk_visual_get_colormap_size (GdkVisual *visual)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_VISUAL (visual), 0);
|
||||||
|
|
||||||
|
return visual->colormap_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_bits_per_rgb:
|
||||||
|
* @visual: a #GdkVisual
|
||||||
|
*
|
||||||
|
* Returns the number of significant bits per red, green and blue value.
|
||||||
|
*
|
||||||
|
* Return value: The number of significant bits per color value for @visual.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gint
|
||||||
|
gdk_visual_get_bits_per_rgb (GdkVisual *visual)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_VISUAL (visual), 0);
|
||||||
|
|
||||||
|
return visual->bits_per_rgb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_red_pixel_details:
|
||||||
|
* @visual: A #GdkVisual.
|
||||||
|
* @mask: (out) (allow-none): A pointer to a #guint32 to be filled in, or %NULL.
|
||||||
|
* @shift: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
* @precision: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
*
|
||||||
|
* Obtains values that are needed to calculate red pixel values in TrueColor
|
||||||
|
* and DirectColor. The "mask" is the significant bits within the pixel.
|
||||||
|
* The "shift" is the number of bits left we must shift a primary for it
|
||||||
|
* to be in position (according to the "mask"). Finally, "precision" refers
|
||||||
|
* to how much precision the pixel value contains for a particular primary.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_visual_get_red_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDK_IS_VISUAL (visual));
|
||||||
|
|
||||||
|
if (mask)
|
||||||
|
*mask = visual->red_mask;
|
||||||
|
|
||||||
|
if (shift)
|
||||||
|
*shift = visual->red_shift;
|
||||||
|
|
||||||
|
if (precision)
|
||||||
|
*precision = visual->red_prec;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_green_pixel_details:
|
||||||
|
* @visual: a #GdkVisual
|
||||||
|
* @mask: (out) (allow-none): A pointer to a #guint32 to be filled in, or %NULL.
|
||||||
|
* @shift: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
* @precision: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
*
|
||||||
|
* Obtains values that are needed to calculate green pixel values in TrueColor
|
||||||
|
* and DirectColor. The "mask" is the significant bits within the pixel.
|
||||||
|
* The "shift" is the number of bits left we must shift a primary for it
|
||||||
|
* to be in position (according to the "mask"). Finally, "precision" refers
|
||||||
|
* to how much precision the pixel value contains for a particular primary.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_visual_get_green_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDK_IS_VISUAL (visual));
|
||||||
|
|
||||||
|
if (mask)
|
||||||
|
*mask = visual->green_mask;
|
||||||
|
|
||||||
|
if (shift)
|
||||||
|
*shift = visual->green_shift;
|
||||||
|
|
||||||
|
if (precision)
|
||||||
|
*precision = visual->green_prec;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_visual_get_blue_pixel_details:
|
||||||
|
* @visual: a #GdkVisual
|
||||||
|
* @mask: (out) (allow-none): A pointer to a #guint32 to be filled in, or %NULL.
|
||||||
|
* @shift: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
* @precision: (out) (allow-none): A pointer to a #gint to be filled in, or %NULL.
|
||||||
|
*
|
||||||
|
* Obtains values that are needed to calculate blue pixel values in TrueColor
|
||||||
|
* and DirectColor. The "mask" is the significant bits within the pixel.
|
||||||
|
* The "shift" is the number of bits left we must shift a primary for it
|
||||||
|
* to be in position (according to the "mask"). Finally, "precision" refers
|
||||||
|
* to how much precision the pixel value contains for a particular primary.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_visual_get_blue_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDK_IS_VISUAL (visual));
|
||||||
|
|
||||||
|
if (mask)
|
||||||
|
*mask = visual->blue_mask;
|
||||||
|
|
||||||
|
if (shift)
|
||||||
|
*shift = visual->blue_shift;
|
||||||
|
|
||||||
|
if (precision)
|
||||||
|
*precision = visual->blue_prec;
|
||||||
|
}
|
||||||
|
|
||||||
#define __GDK_VISUAL_C__
|
#define __GDK_VISUAL_C__
|
||||||
#include "gdkaliasdef.c"
|
#include "gdkaliasdef.c"
|
||||||
|
@ -78,23 +78,23 @@ struct _GdkVisual
|
|||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
GdkVisualType type;
|
GdkVisualType GSEAL (type);
|
||||||
gint depth;
|
gint GSEAL (depth);
|
||||||
GdkByteOrder byte_order;
|
GdkByteOrder GSEAL (byte_order);
|
||||||
gint colormap_size;
|
gint GSEAL (colormap_size);
|
||||||
gint bits_per_rgb;
|
gint GSEAL (bits_per_rgb);
|
||||||
|
|
||||||
guint32 red_mask;
|
guint32 GSEAL (red_mask);
|
||||||
gint red_shift;
|
gint GSEAL (red_shift);
|
||||||
gint red_prec;
|
gint GSEAL (red_prec);
|
||||||
|
|
||||||
guint32 green_mask;
|
guint32 GSEAL (green_mask);
|
||||||
gint green_shift;
|
gint GSEAL (green_shift);
|
||||||
gint green_prec;
|
gint GSEAL (green_prec);
|
||||||
|
|
||||||
guint32 blue_mask;
|
guint32 GSEAL (blue_mask);
|
||||||
gint blue_shift;
|
gint GSEAL (blue_shift);
|
||||||
gint blue_prec;
|
gint GSEAL (blue_prec);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gdk_visual_get_type (void) G_GNUC_CONST;
|
GType gdk_visual_get_type (void) G_GNUC_CONST;
|
||||||
@ -119,6 +119,23 @@ GList* gdk_list_visuals (void);
|
|||||||
|
|
||||||
GdkScreen *gdk_visual_get_screen (GdkVisual *visual);
|
GdkScreen *gdk_visual_get_screen (GdkVisual *visual);
|
||||||
|
|
||||||
|
GdkVisualType gdk_visual_get_visual_type (GdkVisual *visual);
|
||||||
|
gint gdk_visual_get_depth (GdkVisual *visual);
|
||||||
|
GdkByteOrder gdk_visual_get_byte_order (GdkVisual *visual);
|
||||||
|
gint gdk_visual_get_colormap_size (GdkVisual *visual);
|
||||||
|
gint gdk_visual_get_bits_per_rgb (GdkVisual *visual);
|
||||||
|
void gdk_visual_get_red_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision);
|
||||||
|
void gdk_visual_get_green_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision);
|
||||||
|
void gdk_visual_get_blue_pixel_details (GdkVisual *visual,
|
||||||
|
guint32 *mask,
|
||||||
|
gint *shift,
|
||||||
|
gint *precision);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
210
gdk/gdkwindow.c
210
gdk/gdkwindow.c
@ -7850,6 +7850,29 @@ gdk_window_move_region (GdkWindow *window,
|
|||||||
gdk_region_destroy (nocopy_area);
|
gdk_region_destroy (nocopy_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_background:
|
||||||
|
* @window: a #GdkWindow.
|
||||||
|
* @color: (out): a #GdkColor to be filled in
|
||||||
|
*
|
||||||
|
* Sets @color to equal the current background color of @window.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_window_get_background (GdkWindow *window,
|
||||||
|
GdkColor *color)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
g_return_if_fail (color != NULL);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *) window;
|
||||||
|
|
||||||
|
*color = private->bg_color;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_window_set_background:
|
* gdk_window_set_background:
|
||||||
* @window: a #GdkWindow
|
* @window: a #GdkWindow
|
||||||
@ -7863,7 +7886,7 @@ gdk_window_move_region (GdkWindow *window,
|
|||||||
* The @color must be allocated; gdk_rgb_find_color() is the best way
|
* The @color must be allocated; gdk_rgb_find_color() is the best way
|
||||||
* to allocate a color.
|
* to allocate a color.
|
||||||
*
|
*
|
||||||
* See also gdk_window_set_back_pixmap().
|
* See also gdk_window_set_background_pixmap().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_window_set_background (GdkWindow *window,
|
gdk_window_set_background (GdkWindow *window,
|
||||||
@ -7896,6 +7919,43 @@ gdk_window_set_background (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_back_pixmap:
|
||||||
|
* @window: a #GdkWindow.
|
||||||
|
* @pixmap: (out) (allow-none): a #GdkPixmap to be filled in, or %NULL.
|
||||||
|
* @parent_relative: (out) (allow-none): a pointer to a #gboolean to be filled in, or %NULL.
|
||||||
|
*
|
||||||
|
* Sets @pixmap to the current background pixmap of @window. You do not
|
||||||
|
* own the pointer that is returned and this pointer should not be freeed
|
||||||
|
* or unreferenced. Sets @parent_relative to %TRUE if the tiling is done
|
||||||
|
* based on the origin of the parent window.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gdk_window_get_back_pixmap (GdkWindow *window,
|
||||||
|
GdkPixmap **pixmap,
|
||||||
|
gboolean *parent_relative)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
|
private = (GdkWindowObject *) window;
|
||||||
|
|
||||||
|
if (pixmap)
|
||||||
|
{
|
||||||
|
if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG ||
|
||||||
|
private->bg_pixmap == GDK_NO_BG)
|
||||||
|
*pixmap = NULL;
|
||||||
|
else
|
||||||
|
*pixmap = private->bg_pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parent_relative)
|
||||||
|
*parent_relative = (private->bg_pixmap == GDK_PARENT_RELATIVE_BG);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_window_set_back_pixmap:
|
* gdk_window_set_back_pixmap:
|
||||||
* @window: a #GdkWindow
|
* @window: a #GdkWindow
|
||||||
@ -8222,8 +8282,10 @@ gdk_window_get_root_coords (GdkWindow *window,
|
|||||||
* @window: a child window
|
* @window: a child window
|
||||||
* @x: X coordinate in child's coordinate system
|
* @x: X coordinate in child's coordinate system
|
||||||
* @y: Y coordinate in child's coordinate system
|
* @y: Y coordinate in child's coordinate system
|
||||||
* @parent_x: return location for X coordinate in parent's coordinate system
|
* @parent_x: (out) (allow-none): return location for X coordinate
|
||||||
* @parent_y: return location for Y coordinate in parent's coordinate system
|
* in parent's coordinate system, or %NULL
|
||||||
|
* @parent_y: (out) (allow-none): return location for Y coordinate
|
||||||
|
* in parent's coordinate system, or %NULL
|
||||||
*
|
*
|
||||||
* Transforms window coordinates from a child window to its parent
|
* Transforms window coordinates from a child window to its parent
|
||||||
* window, where the parent window is the normal parent as returned by
|
* window, where the parent window is the normal parent as returned by
|
||||||
@ -8284,8 +8346,8 @@ gdk_window_coords_to_parent (GdkWindow *window,
|
|||||||
* @window: a child window
|
* @window: a child window
|
||||||
* @parent_x: X coordinate in parent's coordinate system
|
* @parent_x: X coordinate in parent's coordinate system
|
||||||
* @parent_y: Y coordinate in parent's coordinate system
|
* @parent_y: Y coordinate in parent's coordinate system
|
||||||
* @x: return location for X coordinate in child's coordinate system
|
* @x: (out) (allow-none): return location for X coordinate in child's coordinate system
|
||||||
* @y: return location for Y coordinate in child's coordinate system
|
* @y: (out) (allow-none): return location for Y coordinate in child's coordinate system
|
||||||
*
|
*
|
||||||
* Transforms window coordinates from a parent window to a child
|
* Transforms window coordinates from a parent window to a child
|
||||||
* window, where the parent window is the normal parent as returned by
|
* window, where the parent window is the normal parent as returned by
|
||||||
@ -8806,6 +8868,30 @@ gdk_window_set_static_gravities (GdkWindow *window,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_composited:
|
||||||
|
* @window: a #GdkWindow
|
||||||
|
*
|
||||||
|
* Determines whether @window is composited.
|
||||||
|
*
|
||||||
|
* See gdk_window_set_composited().
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the window is composited.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
gdk_window_get_composited (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *)window;
|
||||||
|
|
||||||
|
return private->composited;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_window_set_composited:
|
* gdk_window_set_composited:
|
||||||
* @window: a #GdkWindow
|
* @window: a #GdkWindow
|
||||||
@ -8921,6 +9007,120 @@ gdk_window_remove_redirection (GdkWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_modal_hint:
|
||||||
|
* @window: A toplevel #GdkWindow.
|
||||||
|
*
|
||||||
|
* Determines whether or not the window manager is hinted that @window
|
||||||
|
* has modal behaviour.
|
||||||
|
*
|
||||||
|
* Return value: whether or not the window has the modal hint set.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_window_get_modal_hint (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject*) window;
|
||||||
|
|
||||||
|
return private->modal_hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_accept_focus:
|
||||||
|
* @window: a toplevel #GdkWindow.
|
||||||
|
*
|
||||||
|
* Determines whether or not the desktop environment shuld be hinted that
|
||||||
|
* the window does not want to receive input focus.
|
||||||
|
*
|
||||||
|
* Return value: whether or not the window should receive input focus.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_window_get_accept_focus (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *)window;
|
||||||
|
|
||||||
|
return private->accept_focus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_get_focus_on_map:
|
||||||
|
* @window: a toplevel #GdkWindow.
|
||||||
|
*
|
||||||
|
* Determines whether or not the desktop environment should be hinted that the
|
||||||
|
* window does not want to receive input focus when it is mapped.
|
||||||
|
*
|
||||||
|
* Return value: whether or not the window wants to receive input focus when
|
||||||
|
* it is mapped.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_window_get_focus_on_map (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *)window;
|
||||||
|
|
||||||
|
return private->focus_on_map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_is_input_only:
|
||||||
|
* @window: a toplevel #GdkWindow
|
||||||
|
*
|
||||||
|
* Determines whether or not the window is an input only window.
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if @window is input only
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_window_is_input_only (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *)window;
|
||||||
|
|
||||||
|
return private->input_only;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_window_is_shaped:
|
||||||
|
* @window: a toplevel #GdkWindow
|
||||||
|
*
|
||||||
|
* Determines whether or not the window is shaped.
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if @window is shaped
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gdk_window_is_shaped (GdkWindow *window)
|
||||||
|
{
|
||||||
|
GdkWindowObject *private;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
private = (GdkWindowObject *)window;
|
||||||
|
|
||||||
|
return private->shaped;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
apply_redirect_to_children (GdkWindowObject *private,
|
apply_redirect_to_children (GdkWindowObject *private,
|
||||||
GdkWindowRedirect *redirect)
|
GdkWindowRedirect *redirect)
|
||||||
|
@ -505,50 +505,50 @@ struct _GdkWindowObject
|
|||||||
{
|
{
|
||||||
GdkDrawable parent_instance;
|
GdkDrawable parent_instance;
|
||||||
|
|
||||||
GdkDrawable *impl; /* window-system-specific delegate object */
|
GdkDrawable *GSEAL (impl); /* window-system-specific delegate object */
|
||||||
|
|
||||||
GdkWindowObject *parent;
|
GdkWindowObject *GSEAL (parent);
|
||||||
|
|
||||||
gpointer user_data;
|
gpointer GSEAL (user_data);
|
||||||
|
|
||||||
gint x;
|
gint GSEAL (x);
|
||||||
gint y;
|
gint GSEAL (y);
|
||||||
|
|
||||||
gint extension_events;
|
gint GSEAL (extension_events);
|
||||||
|
|
||||||
GList *filters;
|
GList *GSEAL (filters);
|
||||||
GList *children;
|
GList *GSEAL (children);
|
||||||
|
|
||||||
GdkColor bg_color;
|
GdkColor GSEAL (bg_color);
|
||||||
GdkPixmap *bg_pixmap;
|
GdkPixmap *GSEAL (bg_pixmap);
|
||||||
|
|
||||||
GSList *paint_stack;
|
GSList *GSEAL (paint_stack);
|
||||||
|
|
||||||
GdkRegion *update_area;
|
GdkRegion *GSEAL (update_area);
|
||||||
guint update_freeze_count;
|
guint GSEAL (update_freeze_count);
|
||||||
|
|
||||||
guint8 window_type;
|
guint8 GSEAL (window_type);
|
||||||
guint8 depth;
|
guint8 GSEAL (depth);
|
||||||
guint8 resize_count;
|
guint8 GSEAL (resize_count);
|
||||||
|
|
||||||
GdkWindowState state;
|
GdkWindowState GSEAL (state);
|
||||||
|
|
||||||
guint guffaw_gravity : 1;
|
guint GSEAL (guffaw_gravity) : 1;
|
||||||
guint input_only : 1;
|
guint GSEAL (input_only) : 1;
|
||||||
guint modal_hint : 1;
|
guint GSEAL (modal_hint) : 1;
|
||||||
guint composited : 1;
|
guint GSEAL (composited) : 1;
|
||||||
|
|
||||||
guint destroyed : 2;
|
guint GSEAL (destroyed) : 2;
|
||||||
|
|
||||||
guint accept_focus : 1;
|
guint GSEAL (accept_focus) : 1;
|
||||||
guint focus_on_map : 1;
|
guint GSEAL (focus_on_map) : 1;
|
||||||
guint shaped : 1;
|
guint GSEAL (shaped) : 1;
|
||||||
|
|
||||||
GdkEventMask event_mask;
|
GdkEventMask GSEAL (event_mask);
|
||||||
|
|
||||||
guint update_and_descendants_freeze_count;
|
guint GSEAL (update_and_descendants_freeze_count);
|
||||||
|
|
||||||
GdkWindowRedirect *redirect;
|
GdkWindowRedirect *GSEAL (redirect);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -610,8 +610,10 @@ void gdk_window_set_user_data (GdkWindow *window,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
void gdk_window_set_override_redirect (GdkWindow *window,
|
void gdk_window_set_override_redirect (GdkWindow *window,
|
||||||
gboolean override_redirect);
|
gboolean override_redirect);
|
||||||
|
gboolean gdk_window_get_accept_focus (GdkWindow *window);
|
||||||
void gdk_window_set_accept_focus (GdkWindow *window,
|
void gdk_window_set_accept_focus (GdkWindow *window,
|
||||||
gboolean accept_focus);
|
gboolean accept_focus);
|
||||||
|
gboolean gdk_window_get_focus_on_map (GdkWindow *window);
|
||||||
void gdk_window_set_focus_on_map (GdkWindow *window,
|
void gdk_window_set_focus_on_map (GdkWindow *window,
|
||||||
gboolean focus_on_map);
|
gboolean focus_on_map);
|
||||||
void gdk_window_add_filter (GdkWindow *window,
|
void gdk_window_add_filter (GdkWindow *window,
|
||||||
@ -653,6 +655,7 @@ void gdk_window_shape_combine_region (GdkWindow *window,
|
|||||||
*/
|
*/
|
||||||
void gdk_window_set_child_shapes (GdkWindow *window);
|
void gdk_window_set_child_shapes (GdkWindow *window);
|
||||||
|
|
||||||
|
gboolean gdk_window_get_composited (GdkWindow *window);
|
||||||
void gdk_window_set_composited (GdkWindow *window,
|
void gdk_window_set_composited (GdkWindow *window,
|
||||||
gboolean composited);
|
gboolean composited);
|
||||||
|
|
||||||
@ -685,6 +688,8 @@ void gdk_window_merge_child_input_shapes (GdkWindow *window);
|
|||||||
*/
|
*/
|
||||||
gboolean gdk_window_is_visible (GdkWindow *window);
|
gboolean gdk_window_is_visible (GdkWindow *window);
|
||||||
gboolean gdk_window_is_viewable (GdkWindow *window);
|
gboolean gdk_window_is_viewable (GdkWindow *window);
|
||||||
|
gboolean gdk_window_is_input_only (GdkWindow *window);
|
||||||
|
gboolean gdk_window_is_shaped (GdkWindow *window);
|
||||||
|
|
||||||
GdkWindowState gdk_window_get_state (GdkWindow *window);
|
GdkWindowState gdk_window_get_state (GdkWindow *window);
|
||||||
|
|
||||||
@ -711,6 +716,7 @@ void gdk_window_set_type_hint (GdkWindow *window,
|
|||||||
GdkWindowTypeHint hint);
|
GdkWindowTypeHint hint);
|
||||||
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
|
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
|
||||||
|
|
||||||
|
gboolean gdk_window_get_modal_hint (GdkWindow *window);
|
||||||
void gdk_window_set_modal_hint (GdkWindow *window,
|
void gdk_window_set_modal_hint (GdkWindow *window,
|
||||||
gboolean modal);
|
gboolean modal);
|
||||||
|
|
||||||
@ -735,14 +741,19 @@ void gdk_window_flush (GdkWindow *window);
|
|||||||
|
|
||||||
void gdk_window_set_title (GdkWindow *window,
|
void gdk_window_set_title (GdkWindow *window,
|
||||||
const gchar *title);
|
const gchar *title);
|
||||||
void gdk_window_set_role (GdkWindow *window,
|
void gdk_window_set_role (GdkWindow *window,
|
||||||
const gchar *role);
|
const gchar *role);
|
||||||
void gdk_window_set_startup_id (GdkWindow *window,
|
void gdk_window_set_startup_id (GdkWindow *window,
|
||||||
const gchar *startup_id);
|
const gchar *startup_id);
|
||||||
void gdk_window_set_transient_for (GdkWindow *window,
|
void gdk_window_set_transient_for (GdkWindow *window,
|
||||||
GdkWindow *parent);
|
GdkWindow *parent);
|
||||||
|
void gdk_window_get_background (GdkWindow *window,
|
||||||
|
GdkColor *color);
|
||||||
void gdk_window_set_background (GdkWindow *window,
|
void gdk_window_set_background (GdkWindow *window,
|
||||||
const GdkColor *color);
|
const GdkColor *color);
|
||||||
|
void gdk_window_get_back_pixmap (GdkWindow *window,
|
||||||
|
GdkPixmap **pixmap,
|
||||||
|
gboolean *parent_relative);
|
||||||
void gdk_window_set_back_pixmap (GdkWindow *window,
|
void gdk_window_set_back_pixmap (GdkWindow *window,
|
||||||
GdkPixmap *pixmap,
|
GdkPixmap *pixmap,
|
||||||
gboolean parent_relative);
|
gboolean parent_relative);
|
||||||
|
@ -116,6 +116,38 @@ gdk_display_list_devices (GdkDisplay *dpy)
|
|||||||
return _gdk_input_devices;
|
return _gdk_input_devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_CONST_RETURN gchar *
|
||||||
|
gdk_device_get_name (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
|
|
||||||
|
return device->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkInputSource
|
||||||
|
gdk_device_get_source (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->source;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkInputMode
|
||||||
|
gdk_device_get_mode (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdk_device_get_has_cursor (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||||
|
|
||||||
|
return device->has_cursor;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_source (GdkDevice *device,
|
gdk_device_set_source (GdkDevice *device,
|
||||||
GdkInputSource source)
|
GdkInputSource source)
|
||||||
@ -123,6 +155,25 @@ gdk_device_set_source (GdkDevice *device,
|
|||||||
device->source = source;
|
device->source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdk_device_get_key (GdkDevice *device,
|
||||||
|
guint index,
|
||||||
|
guint *keyval,
|
||||||
|
GdkModifierType *modifiers)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||||
|
g_return_if_fail (index < device->num_keys);
|
||||||
|
|
||||||
|
if (!device->keys[index].keyval &&
|
||||||
|
!device->keys[index].modifiers)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (keyval)
|
||||||
|
*keyval = device->keys[index].keyval;
|
||||||
|
|
||||||
|
if (modifiers)
|
||||||
|
*modifiers = device->keys[index].modifiers;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_key (GdkDevice *device,
|
gdk_device_set_key (GdkDevice *device,
|
||||||
@ -137,6 +188,16 @@ gdk_device_set_key (GdkDevice *device,
|
|||||||
device->keys[index].modifiers = modifiers;
|
device->keys[index].modifiers = modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GdkAxisUse
|
||||||
|
gdk_device_get_axis_use (GdkDevice *device,
|
||||||
|
guint index)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_AXIS_IGNORE);
|
||||||
|
g_return_val_if_fail (index < device->num_axes, GDK_AXIS_IGNORE);
|
||||||
|
|
||||||
|
return device->axes[index].use;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_axis_use (GdkDevice *device,
|
gdk_device_set_axis_use (GdkDevice *device,
|
||||||
guint index,
|
guint index,
|
||||||
|
@ -109,6 +109,38 @@ gdk_display_list_devices (GdkDisplay *dpy)
|
|||||||
return _gdk_input_devices;
|
return _gdk_input_devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_CONST_RETURN gchar *
|
||||||
|
gdk_device_get_name (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
|
|
||||||
|
return device->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkInputSource
|
||||||
|
gdk_device_get_source (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->source;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkInputMode
|
||||||
|
gdk_device_get_mode (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdk_device_get_has_cursor (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||||
|
|
||||||
|
return device->has_cursor;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_source (GdkDevice *device,
|
gdk_device_set_source (GdkDevice *device,
|
||||||
GdkInputSource source)
|
GdkInputSource source)
|
||||||
@ -118,6 +150,26 @@ gdk_device_set_source (GdkDevice *device,
|
|||||||
device->source = source;
|
device->source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdk_device_get_key (GdkDevice *device,
|
||||||
|
guint index,
|
||||||
|
guint *keyval,
|
||||||
|
GdkModifierType *modifiers)
|
||||||
|
{
|
||||||
|
g_return__if_fail (GDK_IS_DEVICE (device));
|
||||||
|
g_return_if_fail (index < device->num_keys);
|
||||||
|
|
||||||
|
if (!device->keys[index].keyval &&
|
||||||
|
!device->keys[index].modifiers)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (keyval)
|
||||||
|
*keyval = device->keys[index].keyval;
|
||||||
|
|
||||||
|
if (modifiers)
|
||||||
|
*modifiers = device->keys[index].modifiers;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_key (GdkDevice *device,
|
gdk_device_set_key (GdkDevice *device,
|
||||||
guint index,
|
guint index,
|
||||||
@ -131,6 +183,16 @@ gdk_device_set_key (GdkDevice *device,
|
|||||||
device->keys[index].modifiers = modifiers;
|
device->keys[index].modifiers = modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GdkAxisUse
|
||||||
|
gdk_device_get_axis_use (GdkDevice *device,
|
||||||
|
guint index)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_AXIS_IGNORE);
|
||||||
|
g_return_val_if_fail (index < device->num_axes, GDK_AXIS_IGNORE);
|
||||||
|
|
||||||
|
return device->axes[index].use;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_axis_use (GdkDevice *device,
|
gdk_device_set_axis_use (GdkDevice *device,
|
||||||
guint index,
|
guint index,
|
||||||
|
@ -170,6 +170,78 @@ gdk_display_list_devices (GdkDisplay *display)
|
|||||||
return GDK_DISPLAY_X11 (display)->input_devices;
|
return GDK_DISPLAY_X11 (display)->input_devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_name:
|
||||||
|
* @device: a #GdkDevice
|
||||||
|
*
|
||||||
|
* Determines the name of the device.
|
||||||
|
*
|
||||||
|
* Return value: a name
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
const gchar *
|
||||||
|
gdk_device_get_name (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||||
|
|
||||||
|
return device->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_source:
|
||||||
|
* @device: a #GdkDevice
|
||||||
|
*
|
||||||
|
* Determines the type of the device.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkInputSource
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkInputSource
|
||||||
|
gdk_device_get_source (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_mode:
|
||||||
|
* @device: a #GdkDevice
|
||||||
|
*
|
||||||
|
* Determines the mode of the device.
|
||||||
|
*
|
||||||
|
* Return value: a #GdkInputSource
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkInputMode
|
||||||
|
gdk_device_get_mode (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||||
|
|
||||||
|
return device->mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_has_cursor:
|
||||||
|
* @device: a #GdkDevice
|
||||||
|
*
|
||||||
|
* Determines whether the pointer follows device motion.
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if the pointer follows device motion
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
gdk_device_get_has_cursor (GdkDevice *device)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||||
|
|
||||||
|
return device->has_cursor;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_source (GdkDevice *device,
|
gdk_device_set_source (GdkDevice *device,
|
||||||
GdkInputSource source)
|
GdkInputSource source)
|
||||||
@ -179,6 +251,38 @@ gdk_device_set_source (GdkDevice *device,
|
|||||||
device->source = source;
|
device->source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_key:
|
||||||
|
* @device: a #GdkDevice.
|
||||||
|
* @index: the index of the macro button to get.
|
||||||
|
* @keyval: return value for the keyval.
|
||||||
|
* @modifiers: return value for modifiers.
|
||||||
|
*
|
||||||
|
* If @index has a valid keyval, this function will
|
||||||
|
* fill in @keyval and @modifiers with the keyval settings.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
gdk_device_get_key (GdkDevice *device,
|
||||||
|
guint index,
|
||||||
|
guint *keyval,
|
||||||
|
GdkModifierType *modifiers)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||||
|
g_return_if_fail (index < device->num_keys);
|
||||||
|
|
||||||
|
if (!device->keys[index].keyval &&
|
||||||
|
!device->keys[index].modifiers)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (keyval)
|
||||||
|
*keyval = device->keys[index].keyval;
|
||||||
|
|
||||||
|
if (modifiers)
|
||||||
|
*modifiers = device->keys[index].modifiers;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_key (GdkDevice *device,
|
gdk_device_set_key (GdkDevice *device,
|
||||||
guint index,
|
guint index,
|
||||||
@ -192,6 +296,27 @@ gdk_device_set_key (GdkDevice *device,
|
|||||||
device->keys[index].modifiers = modifiers;
|
device->keys[index].modifiers = modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_device_get_axis_use:
|
||||||
|
* @device: a #GdkDevice.
|
||||||
|
* @index: the index of the axis.
|
||||||
|
*
|
||||||
|
* Returns the axis use for @index.
|
||||||
|
*
|
||||||
|
* Returns: a #GdkAxisUse specifying how the axis is used.
|
||||||
|
*
|
||||||
|
* Since: 2.22
|
||||||
|
**/
|
||||||
|
GdkAxisUse
|
||||||
|
gdk_device_get_axis_use (GdkDevice *device,
|
||||||
|
guint index)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_AXIS_IGNORE);
|
||||||
|
g_return_val_if_fail (index < device->num_axes, GDK_AXIS_IGNORE);
|
||||||
|
|
||||||
|
return device->axes[index].use;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_device_set_axis_use (GdkDevice *device,
|
gdk_device_set_axis_use (GdkDevice *device,
|
||||||
guint index,
|
guint index,
|
||||||
|
Loading…
Reference in New Issue
Block a user