gtk/gdk/gdkevents.h

1315 lines
44 KiB
C
Raw Normal View History

/* GDK - The GIMP Drawing Kit
2005-07-12 05:09:13 +00:00
* 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 Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
2012-02-27 13:01:10 +00:00
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
2005-07-12 05:09:13 +00:00
*/
/*
* Modified by the GTK+ Team and others 1997-2000. 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/.
2005-07-12 05:09:13 +00:00
*/
#ifndef __GDK_EVENTS_H__
#define __GDK_EVENTS_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <gdk/gdkversionmacros.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkdnd.h>
2010-05-25 22:38:44 +00:00
#include <gdk/gdkdevice.h>
G_BEGIN_DECLS
/**
* SECTION:event_structs
* @Short_description: Data structures specific to each type of event
* @Title: Event Structures
*
* The event structures contain data specific to each type of event in GDK.
*
2014-02-05 04:57:30 +00:00
* > A common mistake is to forget to set the event mask of a widget so that
* > the required events are received. See gtk_widget_set_events().
*/
#define GDK_TYPE_EVENT (gdk_event_get_type ())
#define GDK_TYPE_EVENT_SEQUENCE (gdk_event_sequence_get_type ())
/**
* GDK_PRIORITY_EVENTS:
*
* This is the priority that events from the X server are given in the
2014-02-07 02:07:03 +00:00
* [GLib Main Loop][glib-The-Main-Event-Loop].
*/
Remove all references to offscreen flag which was no longer used. Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c: Remove all references to offscreen flag which was no longer used. * gtk/gtkprivate.h (enum): Remove unused flags and compress. * gtk/gtkframe.c (gtk_frame_set_label_widget): Check for non-null label_widget->parent. * gtk/gtkentry.c: Get rid of code to deal with PangoAttribute which no longer was used. * gdk/gdkpango.c (gdk_pango_context_get_info): make static. * gdk/gdkpango.c (gdk_draw_layout[_line]): Add checks for null arguments. * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): add check for destroyed windows. Thu Jun 1 13:48:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimmulticontext.c: Add a finalize method and unref the slave context there. * gtk/gtkinvisible.[ch]: Make reference counting behavior identical to GtkWindow. Thu Jun 1 01:54:11 2000 Owen Taylor <otaylor@redhat.com> * Makefile.am gdk/gdkpango.c: Copy the layout render function from pangox to here, so we can write them independent of rendering system, using GDK primitives. * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c: Remove draw_layout() from the vtable, since we have a rendering-system independent implementation in terms of draw_glyphs(). * gdk/gdkpango.c gdkdrawable.h (gdk_draw_layout_line): New function to render a single line. * gdk/x11/gdkpango.c: Move the guts of this file mostly into ../gdkpango.c, which simplifies things, since we don't have to deal with raw X gc's. Fri May 19 04:28:16 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.[ch]: Add get_log_attrs() function to get the logical attributes for a given GtkTextLine. Tue May 30 16:05:39 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Track g_locale_get_codeset() to g_get_codeset() change. Tue May 30 15:03:19 2000 Owen Taylor <otaylor@redhat.com> * gtk/testcalendar.c (calendar_font_selection_ok): Use font descriptions. * gtk/gtkentry.c (gtk_entry_draw_text): Center text within the entry. * gtk/gtkfontsel.c (gtk_font_selection_dialog_init): Start of redoing (vastly simplifying) for Pango. Still needs quite a bit of work. (Size selection is currently poor. List of predefined sizes is not a good idea, since all of these sizes won't necessarily be distinct.) Tue May 30 13:50:19 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Handle CODESET results for LANG=C. Mon May 29 15:49:10 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.[ch]: Add a 'font_name' declaration to RC which takes a stringized pango font description; ignore the older 'font' and 'fontset' declarations. * gtk/gtkstyle.c gtk/gtkrc.c: Fill in the style->font field with a GdkFont derived via gdk_font_from_description(), for compatibility. (Should we just remove it entirely? Probably too much compatibility breakage, but people should be migrating to the new Pango stuff as quickly as possible.) Mon May 29 15:47:41 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c gtk/gtkclist.c: s/pango_font_unref/g_object_unref/. Mon May 29 15:44:46 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkcalender.c: Roughly pango-ized. Really needs redoing; there are some bugs in size allocation right now, the semi-existant distinction between header / day fonts was removed, but, with Pango, could actually be made functional in a nice way. * gtk/testcalender: Move calender from examples into this directory as a test program. (We really need to restrcture testgtk into a whole directory full of tests for every widget or functionality group, separated into multiple .c files.) Mon May 29 15:19:56 2000 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c (file_exists): Fix stupid typo that was keeping RC file from being loaded. * gtk/testgtkrc gtk/testgtkrc2: Test new pango-ized RC file font code. Mon May 29 14:31:27 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.h gdk/x11/gdkfont-x11.c (gdk_font_from_description): Add function to load a GdkFont from a PangoFontDescription. Fri May 26 17:16:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/frame.[ch] gtkaspectframe.c: Make frame widgets able to have any widget for the label, use a GtkLabel widget to display the text. (Based partially on a patch from Anders Carlson.) (Quite a bit of code reorganization - strip 90% of the guts out of gtkaspectframe and add a single virtual func to GtkFrameClass - compute_child_allocation.) Fri May 26 12:00:02 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkctree.c gtk/gtkclist.[ch]: Pangoized. (Removed clist->row_center_offset field because caching it wasn't saving time or code, added private function _gtk_clist_create_cell_layout()). Wed May 24 15:59:37 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c: Pangoized. * gtk/[hv]ruler.c: Pangoized Mon May 22 19:23:59 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_init): Use gtk_clist_set_column_auto_resize() to remove need need for manual column width computations. Mon May 22 18:50:26 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktooltips.[ch]: Replace custom drawing with a GtkLabel, ensuring Pango correctness, and considerably simplifying the code. * gtk/gtklabel.c gtk[hv]scale.c: 1000 => PANGO_SCALE. * gtk/gtklabel.c (gtk_label_size_request): Fixed incorrect getting of numbers of lines. * gtk/gtklabel.c (gtk_label_size_request): Set the requisition to the actual requested width of the lable, not to the wrap width we set. * gtk/gtktextchild.h: Remove extraneous include of gtk/gtk.h. * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextlayout.c gtk/gtktextview.c gtk/gtktextview.[ch]: Fix up includes. * gtk/gtktextview.c: Fix structure inheritance. * gtk/gtkprogressbar.c: Pangoize. Mon May 22 15:47:30 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextview.c (gtk_text_view_get_first_para_iter): Encapsulate in a function. * gtk/gtktextlayout.c (find_display_line_above): Fixed bug with computing line tops. * gtk/gtktextview.c (changed_handler): Fix < , <= confusion. Thu May 18 18:53:31 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix up the x_offset and y_offset coordinates to do what we need now. (The offset between buffer and layout coordinates has been reintroduced, but is a bit different than before.) * gtk/gtktextview.[ch]: No longer inherit from GtkLayout; instead handle the adjustments ourselves, and scroll as necessary using the new gdk_window_scroll(). The advantage of this is that when we are incrementally revalidating, we are essentially rearranging things around the visible portion of the screen. With the old setup, the visible portion of the screen was moved around in the layout, so scrolling and redrawing to track that caused jumping of the display. Since we now control the scrolling ourselves, we can suppress this and only redraw when things actually change. Thu May 18 18:47:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextbtree.c (redisplay_mark): We need to invalidate the region not just redisplay it after-all, since we store the cursors in the LineDisplay. (Ugly interactions here between GtkLayout and GtkTextBTree here.) * gtk/gtktextbtree.c (redisplay_region): Fixed reversed comparison. Thu May 18 18:43:21 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.h gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): Added function to scroll contents of a window while keeping the window constant. Works by XCopyArea or guffaw-scrolling depending on the details of how the window is set up. (guffaw-scrolling still needs to be filled in.) Wed May 17 22:36:53 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextiter.c gtk/gtkmain.c: Add a debug key for the text widget, move the debugging that was tied to a global variable to that. * gtk/gtkmarshal.list: Add NONE:INT,INT,INT * gtk/gtktextbtree.[ch] gtk/gtktextlayout.c: Keep a separate validated flag, in line data instead of setting height/width to -1. This allows us to perform operations with partially invalid buffer (using the old size for invalid lines) and thus to do incremental vaidation. Keep height/width aggregates up to date when deleting text and rebalancing the tree. * gtk/gtktextbtree.[ch]: Add functions validate a line (gtk_text_btree_validate_line), and to validate up to a number of pixels (gtk_text_btree_validate). * gtk/gtktextlayout.[ch]: Add an ::invalidated signal that indicates that something is changed and a revalidation pass is needed. Change ::need_repaint to ::changed, and make it take old and new yranges instead of a rectangle. * gtk/gtktextbtree.[ch] gtk/gtktextlayout.[ch]: Move the line_data_destroy() function from gtk_text_btree_add_view() to a virtual function in GtkTextLayout * gtk/gtktextbtree.[ch]: Remove gtk_text_btree_get_damage_range(), since we are handling partial repaints in a different fashion now. * gtk/gtktextbtree.[ch]: Only repaint the changed portion of the selection instead of queueing a repaint on the entire widget. * gtk/gtktextbuffer.[ch] gtk/gtktextbtree.[ch]: Move get_selection_bounds() down to btree, make the function in buffer a wrapper around the btree function. * gtk/gtktextlayout.[ch]: Add functions to check if the layout is valid and to recompute either a range of pixels aroudn a line or a certain total number of pixels. * gtk/gtktextlayout.[ch]: Cache a single line display; now that we only redraw the needed portions, the hit rate for this cache is quite high. * gtk/gtktextview.[ch]: Keep track of the first paragraph on the screen so that when re-laying-out the buffer, we can keep the same place. This requires connecting to ::value_changed on the adjustments * gtk/gtktextview.[ch]: Add idle functions to revalidate the buffer after we receive an ::invalidated signal. Wed May 17 22:10:47 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c (gtk_layout_size_allocate): Set upper to max of allocation and layout size, not just to the layout size. * gtk/gtk[hv]scrollbar.c (gtk_[hv]scrollbar_calc_slider_size): Invalidate window so it gets redrawn properly. * gdk/gdkwindow.c (gdk_window_invalidate_rect): Allow rect == NULL to mean the entire window. * gdk/gdkevents.h: Move definition for GDK_PRIORITY_REDRAW into public header. Mon May 15 14:51:31 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextmark.c (gtk_text_mark_get_name): Add function to get the name of a mark. * gtk/gtktextlayout.c (gtk_text_layout_get_line_at_y): Add a function to find the paragraph from a y position. Thu May 11 12:57:20 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextbtree.c (gtk_text_btree_node_invalidate_upward): Valid nodes have width/height >= 0, not > 0. Tue May 9 21:29:06 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c (gtk_text_layout_get_line_display): Add a size_only flag, so when we only need the size, we don't create useless appearance attributes. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Remove duplicate setting of font description. * gtk/gtkscale.c: Use PANGO_SCALE instead of 1000 Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into EXTRA_DIST. It does not work well when the file that everything depends on is not in the tarball. Wed Apr 26 00:56:14 2000 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c: Some hacks and fixes so that it basically works when not sitting in the GTK+ build tree. 2000-05-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag): Properly determine the ordering of the tag root and the current line within the tree. Previous algorithm only worked if the tag root's immediate parent was the common root of both the current line and the tag root. Wed Apr 26 00:43:00 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (set_para_values): Fix some bugs in alignment. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Track the widget text directional dynamically. * gtk/gtktextview.[ch]: Added functions to get and set default wrap mode. Tue Apr 25 23:47:38 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Fix bug in cursor location computation. Tue Apr 25 23:22:59 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c (gtk_layout_set_size): Clamp hadjustment/ vadjusment values properly when layout gets smaller. * gtk/gtktextview.c (need_repaint_handler): Areas being passed in are far completely inaccurate, and sometimes too small, so, for now, just queue a redraw on the whole visible region. 2000-04-25 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c (summary_destroy): new function to destroy tag summary nodes (gtk_text_line_next_could_contain_tag): this function was totally broken if the line passed in wasn't below the tag root. Fix it. (gtk_text_btree_first_could_contain_tag): In the tag == NULL "wildcard" case, we have to do a linear scan. Blah. (gtk_text_btree_last_could_contain_tag): In tag == NULL case, we have to do the linear scan (tag_removed_cb): When a tag is removed from the tag table, remove the GtkTextTagInfo node from the btree. (gtk_text_btree_spew): Implement the spew function, for our debugging pleasure. Tue Apr 25 19:40:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_set_buffer): Fix a problem with referring to the wrong buffer. * gtk/gtkentry.c: Fix focus-in/focus-out confusion. * gtk/gtkrc.c gtk/gtkstyle.c: Moving setting default font description to gtk_style_new() - otherwise things don't work without a .gtkrc file. * gtk/gtktextbuffer.c (gtk_text_buffer_new): Sink the tags table if we create it ourself, too. * gdk/gdktypes.h (enum): Move GDK_RELEASE_MASK, since it was conflicting with XKB modifiers. * gtk/gtktextview.[ch]: Add simple support for GtkIMContext. Mon Apr 24 19:34:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_move_cursor_visually): Fix problem with deletion from last commit. Mon Apr 24 19:29:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_create_pango_context): Set the language in the context from the current locale. * gtk/gtkentry.c (gtk_entry_size_request): Use language from the context, not hardcoded value. * gtk/gtkentry.c (gtk_entry_move_cursor): Make character movement visual, not logical. Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c gtk/gtktextdisplay.c: Don't handle selections as attributes - that doesn't handle partial-glyph selection properly. Instead use new pango_layout_line_get_x_ranges() functionality to draw the selection. * gtk/gtkentry.c: Simplify code since pango_layout_line_index_to_x() now properly handles out-of-range coordinates. * gtk/gtktextbuffer.c: Emit "mark_set" when the cursor is moved. * gtk/gtktextiter.h gtk/gtktextiterprivate.h: Make gtk_text_iter_get_line_byte() public. * gtk/gtktextlayout.[ch]: Properly set the direction in the PangoContext for paragraphs opposite to the base direction of the widget. * gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Fixes for alignment. * gtk/gtktextlayout.c: Don't split segments on marks, since that causes Arabic words to reshape as you cursor through. * gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Implement virtual cursor position when moving vertically with the arrow keys and scrolling with page-up/page-down. (Arrow keys save only the X, scrolling saves both X and Y.) This means you can line-up / line-down or page-up / page-down without losing your place, and also that moving vertically with the cursor keys keeps the same X position, not the same character count: * gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Make vertical arrow keys move by display lines, not paragraphs. Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c: Make sure that the bin window is at least as big as the allocation. (Should we also make sure that the bin window is big enough to completely cover widget->window?) * gtk/gtktextview.c (gtk_text_view_get_visible_rect): Add function to get the onscreen rectangle. * gdk/x11/gdkwindow-x11.c (gdk_window_get_pointer): Correctly account for offsets in window coordinates. Sun Apr 16 16:13:27 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_get_cursor_locations): Fix index/offset confusion. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Set the default direction from the widget direction. * gtk/gtktexttag.c gtk/gtktexttagprivate.h (gtk_text_tag_set_arg): Add a "direction" attribute. * gtk/gtktextview.c: global s/tkxt/text_view/. * gtk/testtext.c: Added long block of text in Arabic, to test out the direction attributes. (Some problems with the shaping system for arabic become obvious - like the fact the cursor splits words into unjoined pieces.) Fri Apr 14 12:54:34 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextdisplay.c (render_layout): Add overstrike handling. * gtk/gtktextlayout.c: Fix up alignment. * gtk/testtext.c: Add some tests for centering, wrapping. Fri Apr 14 09:26:22 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c: Add a draw_glyphs() operation to the drawable vtable and gdk_draw_glyphs(). If we wrote GTK+-specific layout-render function this could just replace the draw_layout() operation in the vtable. * gtk/gtkentry.c: Move guts of gtk_entry_get_cursor_locations to pango_layout_get_cursor_pos() and use that function. * gtk/gtktextchild.[ch]: add gtk_ onto pixmap_segment_new(), since it is a non-static symbol. * gtk/gtktextbtree.[ch]: Replace gtk_text_btree_find_line_data_by_y() with gtk_text_btree_find_line_by_y() * gtk/gtktextdisplay.c: Rewrote for Pango - uses a custom layout renderer that handles GtkTextAppearance attributes. * gtk/gtktexttag.[ch] gtk/gtktexttagprivate.h: - Move the values in the style that don't affect geometry into a GtkTextAppearance structure. - Change underline to take a PangoUnderline and "font" a string representation of a font description - Add a "font_desc" attribute which takes a FontDescription structure. * gtk/gtktextlayout.[ch]: - Get rid of the display-line list per each line. Instead, we generate, on demand, a GtkTextLineDisplay structure which] contains a PangoLayout * and other necesary information (offsets, cursor locations) for displaying a paragraph. - Get rid of the code to wrap lines, create display chunks, etc. Instead, we just go through a paragraph and convert it into the necessary inputs to a PangoLayout. - Implement a new attribute type, GtkTextAttrAppearance. This holds a GtkTextAppearance, and is used to pass colors, stipple, etc, through from the layout to the display without having to use lots and lots of individual attributes. - Reimplement gtk_layout_get_iter_at_pixel() gtk_layout_get_iter_pos() in terms of PangoLayout functions. * gtk/gtktextview.c: - Handle passing the necessary PangoContext to the layout - Some fixups in painting to deal with the automatic backing store and offsetting of GTK+-1.4 - Add a style_set handler so that the default style reacts properly to theme changes. * gtk/gtktext?*.[ch]: Random code-style fixes. * gtk/testtext.c: Substitute in languages that Pango handles now for Thai Mon Apr 10 10:33:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktext?*.[ch]: Check in Havoc's port of the Tk text widget, in original form preparatory to Pango-ization and gdkimcontext-ization. Thu Apr 6 19:25:39 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontext.c: Move default implementations to real_* vfuncs, so that we can derive from gtkimcontext in language bindings properly. Thu Apr 6 16:02:52 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontextsimple.[ch]: Use gdk_keyval_to_unicode to gdk_unicode_to_keyval. Add a compose table including (almost) all the compose combinations from X. This is 6k of static, shared data as opposed to 50k or so of dynamic data in the XIM implementation. * gdk/gdk.h gdk/gdkkeyuni.c gdk/win32/gdkevents-win32.c (gdk_keyval_to_unicode, gdk_unicode_to_keyval): Moved functions to convert keyvalues from and to unicode here from the win32 port and made them public. Wed Apr 5 16:37:29 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkeditable.c (gtk_editable_insert_text): Allow new_text_length == -1. Wed Apr 5 16:27:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontext.[ch]: Base class for new input context system * gtk/gtkimmulticontext.[ch]: Proxy input context that allows the real input context implementation to be loaded from modules and switched on the fly. * gtk/gtkcontextsimple.[ch]: Simple implementation of an input context that just does direct keysymbol => unicode translation. * gtk/gtkentry.[ch]: Start switching editing over to using GtkInputContext. (No handling of preedit yet.) Wed Apr 5 15:48:41 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktypeutils.h (GTK_CHECK_GET_CLASS): Fix problem with one too many substitutions. (klass should not be subsituted.) Wed Apr 5 00:18:14 2000 Owen Taylor <otaylor@redhat.com> * configure.in: Add checks for Pango * configure.in docs/Makefile.am: Add test for sgml2html and allow 'make dist' without building html, but print out warnings in that case. (For making snapshots) * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: Add Pango libraries and C flags * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: Add function (gdk_draw_layout) to draw a pango layout. * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions for getting Pango contexts for GDK. * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional editing. * gtk/gtkentry.c: Hack in simple Hebrew input with direct keysym => unicode translations. More languages can be added here, but real input-method support is needed. * docs/Changes-1.4.txt: Added note about entry behavior. * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions to set the reading direction for a widget and the global direction. Add test which allows toggling the global direction. Two private flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, underlining now handled by Pango. * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription to RCStyle and Style. (Having both this and the old font name and GdkFont is temporary.) * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added convenience functions for creating contexts and layouts for widgets. * gtk/testgtk.c: Enhance label tests with multilingual labels.
2000-06-02 03:14:07 +00:00
#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
/**
* GDK_PRIORITY_REDRAW:
*
* This is the priority that the idle handler processing window updates
* is given in the
2014-02-07 02:07:03 +00:00
* [GLib Main Loop][glib-The-Main-Event-Loop].
*/
Remove all references to offscreen flag which was no longer used. Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c: Remove all references to offscreen flag which was no longer used. * gtk/gtkprivate.h (enum): Remove unused flags and compress. * gtk/gtkframe.c (gtk_frame_set_label_widget): Check for non-null label_widget->parent. * gtk/gtkentry.c: Get rid of code to deal with PangoAttribute which no longer was used. * gdk/gdkpango.c (gdk_pango_context_get_info): make static. * gdk/gdkpango.c (gdk_draw_layout[_line]): Add checks for null arguments. * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): add check for destroyed windows. Thu Jun 1 13:48:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimmulticontext.c: Add a finalize method and unref the slave context there. * gtk/gtkinvisible.[ch]: Make reference counting behavior identical to GtkWindow. Thu Jun 1 01:54:11 2000 Owen Taylor <otaylor@redhat.com> * Makefile.am gdk/gdkpango.c: Copy the layout render function from pangox to here, so we can write them independent of rendering system, using GDK primitives. * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c: Remove draw_layout() from the vtable, since we have a rendering-system independent implementation in terms of draw_glyphs(). * gdk/gdkpango.c gdkdrawable.h (gdk_draw_layout_line): New function to render a single line. * gdk/x11/gdkpango.c: Move the guts of this file mostly into ../gdkpango.c, which simplifies things, since we don't have to deal with raw X gc's. Fri May 19 04:28:16 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.[ch]: Add get_log_attrs() function to get the logical attributes for a given GtkTextLine. Tue May 30 16:05:39 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Track g_locale_get_codeset() to g_get_codeset() change. Tue May 30 15:03:19 2000 Owen Taylor <otaylor@redhat.com> * gtk/testcalendar.c (calendar_font_selection_ok): Use font descriptions. * gtk/gtkentry.c (gtk_entry_draw_text): Center text within the entry. * gtk/gtkfontsel.c (gtk_font_selection_dialog_init): Start of redoing (vastly simplifying) for Pango. Still needs quite a bit of work. (Size selection is currently poor. List of predefined sizes is not a good idea, since all of these sizes won't necessarily be distinct.) Tue May 30 13:50:19 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Handle CODESET results for LANG=C. Mon May 29 15:49:10 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.[ch]: Add a 'font_name' declaration to RC which takes a stringized pango font description; ignore the older 'font' and 'fontset' declarations. * gtk/gtkstyle.c gtk/gtkrc.c: Fill in the style->font field with a GdkFont derived via gdk_font_from_description(), for compatibility. (Should we just remove it entirely? Probably too much compatibility breakage, but people should be migrating to the new Pango stuff as quickly as possible.) Mon May 29 15:47:41 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c gtk/gtkclist.c: s/pango_font_unref/g_object_unref/. Mon May 29 15:44:46 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkcalender.c: Roughly pango-ized. Really needs redoing; there are some bugs in size allocation right now, the semi-existant distinction between header / day fonts was removed, but, with Pango, could actually be made functional in a nice way. * gtk/testcalender: Move calender from examples into this directory as a test program. (We really need to restrcture testgtk into a whole directory full of tests for every widget or functionality group, separated into multiple .c files.) Mon May 29 15:19:56 2000 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c (file_exists): Fix stupid typo that was keeping RC file from being loaded. * gtk/testgtkrc gtk/testgtkrc2: Test new pango-ized RC file font code. Mon May 29 14:31:27 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkfont.h gdk/x11/gdkfont-x11.c (gdk_font_from_description): Add function to load a GdkFont from a PangoFontDescription. Fri May 26 17:16:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/frame.[ch] gtkaspectframe.c: Make frame widgets able to have any widget for the label, use a GtkLabel widget to display the text. (Based partially on a patch from Anders Carlson.) (Quite a bit of code reorganization - strip 90% of the guts out of gtkaspectframe and add a single virtual func to GtkFrameClass - compute_child_allocation.) Fri May 26 12:00:02 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkctree.c gtk/gtkclist.[ch]: Pangoized. (Removed clist->row_center_offset field because caching it wasn't saving time or code, added private function _gtk_clist_create_cell_layout()). Wed May 24 15:59:37 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c: Pangoized. * gtk/[hv]ruler.c: Pangoized Mon May 22 19:23:59 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_init): Use gtk_clist_set_column_auto_resize() to remove need need for manual column width computations. Mon May 22 18:50:26 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktooltips.[ch]: Replace custom drawing with a GtkLabel, ensuring Pango correctness, and considerably simplifying the code. * gtk/gtklabel.c gtk[hv]scale.c: 1000 => PANGO_SCALE. * gtk/gtklabel.c (gtk_label_size_request): Fixed incorrect getting of numbers of lines. * gtk/gtklabel.c (gtk_label_size_request): Set the requisition to the actual requested width of the lable, not to the wrap width we set. * gtk/gtktextchild.h: Remove extraneous include of gtk/gtk.h. * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextlayout.c gtk/gtktextview.c gtk/gtktextview.[ch]: Fix up includes. * gtk/gtktextview.c: Fix structure inheritance. * gtk/gtkprogressbar.c: Pangoize. Mon May 22 15:47:30 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextview.c (gtk_text_view_get_first_para_iter): Encapsulate in a function. * gtk/gtktextlayout.c (find_display_line_above): Fixed bug with computing line tops. * gtk/gtktextview.c (changed_handler): Fix < , <= confusion. Thu May 18 18:53:31 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix up the x_offset and y_offset coordinates to do what we need now. (The offset between buffer and layout coordinates has been reintroduced, but is a bit different than before.) * gtk/gtktextview.[ch]: No longer inherit from GtkLayout; instead handle the adjustments ourselves, and scroll as necessary using the new gdk_window_scroll(). The advantage of this is that when we are incrementally revalidating, we are essentially rearranging things around the visible portion of the screen. With the old setup, the visible portion of the screen was moved around in the layout, so scrolling and redrawing to track that caused jumping of the display. Since we now control the scrolling ourselves, we can suppress this and only redraw when things actually change. Thu May 18 18:47:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextbtree.c (redisplay_mark): We need to invalidate the region not just redisplay it after-all, since we store the cursors in the LineDisplay. (Ugly interactions here between GtkLayout and GtkTextBTree here.) * gtk/gtktextbtree.c (redisplay_region): Fixed reversed comparison. Thu May 18 18:43:21 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.h gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): Added function to scroll contents of a window while keeping the window constant. Works by XCopyArea or guffaw-scrolling depending on the details of how the window is set up. (guffaw-scrolling still needs to be filled in.) Wed May 17 22:36:53 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextiter.c gtk/gtkmain.c: Add a debug key for the text widget, move the debugging that was tied to a global variable to that. * gtk/gtkmarshal.list: Add NONE:INT,INT,INT * gtk/gtktextbtree.[ch] gtk/gtktextlayout.c: Keep a separate validated flag, in line data instead of setting height/width to -1. This allows us to perform operations with partially invalid buffer (using the old size for invalid lines) and thus to do incremental vaidation. Keep height/width aggregates up to date when deleting text and rebalancing the tree. * gtk/gtktextbtree.[ch]: Add functions validate a line (gtk_text_btree_validate_line), and to validate up to a number of pixels (gtk_text_btree_validate). * gtk/gtktextlayout.[ch]: Add an ::invalidated signal that indicates that something is changed and a revalidation pass is needed. Change ::need_repaint to ::changed, and make it take old and new yranges instead of a rectangle. * gtk/gtktextbtree.[ch] gtk/gtktextlayout.[ch]: Move the line_data_destroy() function from gtk_text_btree_add_view() to a virtual function in GtkTextLayout * gtk/gtktextbtree.[ch]: Remove gtk_text_btree_get_damage_range(), since we are handling partial repaints in a different fashion now. * gtk/gtktextbtree.[ch]: Only repaint the changed portion of the selection instead of queueing a repaint on the entire widget. * gtk/gtktextbuffer.[ch] gtk/gtktextbtree.[ch]: Move get_selection_bounds() down to btree, make the function in buffer a wrapper around the btree function. * gtk/gtktextlayout.[ch]: Add functions to check if the layout is valid and to recompute either a range of pixels aroudn a line or a certain total number of pixels. * gtk/gtktextlayout.[ch]: Cache a single line display; now that we only redraw the needed portions, the hit rate for this cache is quite high. * gtk/gtktextview.[ch]: Keep track of the first paragraph on the screen so that when re-laying-out the buffer, we can keep the same place. This requires connecting to ::value_changed on the adjustments * gtk/gtktextview.[ch]: Add idle functions to revalidate the buffer after we receive an ::invalidated signal. Wed May 17 22:10:47 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c (gtk_layout_size_allocate): Set upper to max of allocation and layout size, not just to the layout size. * gtk/gtk[hv]scrollbar.c (gtk_[hv]scrollbar_calc_slider_size): Invalidate window so it gets redrawn properly. * gdk/gdkwindow.c (gdk_window_invalidate_rect): Allow rect == NULL to mean the entire window. * gdk/gdkevents.h: Move definition for GDK_PRIORITY_REDRAW into public header. Mon May 15 14:51:31 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextmark.c (gtk_text_mark_get_name): Add function to get the name of a mark. * gtk/gtktextlayout.c (gtk_text_layout_get_line_at_y): Add a function to find the paragraph from a y position. Thu May 11 12:57:20 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextbtree.c (gtk_text_btree_node_invalidate_upward): Valid nodes have width/height >= 0, not > 0. Tue May 9 21:29:06 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c (gtk_text_layout_get_line_display): Add a size_only flag, so when we only need the size, we don't create useless appearance attributes. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Remove duplicate setting of font description. * gtk/gtkscale.c: Use PANGO_SCALE instead of 1000 Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into EXTRA_DIST. It does not work well when the file that everything depends on is not in the tarball. Wed Apr 26 00:56:14 2000 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c: Some hacks and fixes so that it basically works when not sitting in the GTK+ build tree. 2000-05-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag): Properly determine the ordering of the tag root and the current line within the tree. Previous algorithm only worked if the tag root's immediate parent was the common root of both the current line and the tag root. Wed Apr 26 00:43:00 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (set_para_values): Fix some bugs in alignment. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Track the widget text directional dynamically. * gtk/gtktextview.[ch]: Added functions to get and set default wrap mode. Tue Apr 25 23:47:38 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Fix bug in cursor location computation. Tue Apr 25 23:22:59 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c (gtk_layout_set_size): Clamp hadjustment/ vadjusment values properly when layout gets smaller. * gtk/gtktextview.c (need_repaint_handler): Areas being passed in are far completely inaccurate, and sometimes too small, so, for now, just queue a redraw on the whole visible region. 2000-04-25 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c (summary_destroy): new function to destroy tag summary nodes (gtk_text_line_next_could_contain_tag): this function was totally broken if the line passed in wasn't below the tag root. Fix it. (gtk_text_btree_first_could_contain_tag): In the tag == NULL "wildcard" case, we have to do a linear scan. Blah. (gtk_text_btree_last_could_contain_tag): In tag == NULL case, we have to do the linear scan (tag_removed_cb): When a tag is removed from the tag table, remove the GtkTextTagInfo node from the btree. (gtk_text_btree_spew): Implement the spew function, for our debugging pleasure. Tue Apr 25 19:40:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_set_buffer): Fix a problem with referring to the wrong buffer. * gtk/gtkentry.c: Fix focus-in/focus-out confusion. * gtk/gtkrc.c gtk/gtkstyle.c: Moving setting default font description to gtk_style_new() - otherwise things don't work without a .gtkrc file. * gtk/gtktextbuffer.c (gtk_text_buffer_new): Sink the tags table if we create it ourself, too. * gdk/gdktypes.h (enum): Move GDK_RELEASE_MASK, since it was conflicting with XKB modifiers. * gtk/gtktextview.[ch]: Add simple support for GtkIMContext. Mon Apr 24 19:34:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_move_cursor_visually): Fix problem with deletion from last commit. Mon Apr 24 19:29:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_create_pango_context): Set the language in the context from the current locale. * gtk/gtkentry.c (gtk_entry_size_request): Use language from the context, not hardcoded value. * gtk/gtkentry.c (gtk_entry_move_cursor): Make character movement visual, not logical. Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c gtk/gtktextdisplay.c: Don't handle selections as attributes - that doesn't handle partial-glyph selection properly. Instead use new pango_layout_line_get_x_ranges() functionality to draw the selection. * gtk/gtkentry.c: Simplify code since pango_layout_line_index_to_x() now properly handles out-of-range coordinates. * gtk/gtktextbuffer.c: Emit "mark_set" when the cursor is moved. * gtk/gtktextiter.h gtk/gtktextiterprivate.h: Make gtk_text_iter_get_line_byte() public. * gtk/gtktextlayout.[ch]: Properly set the direction in the PangoContext for paragraphs opposite to the base direction of the widget. * gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Fixes for alignment. * gtk/gtktextlayout.c: Don't split segments on marks, since that causes Arabic words to reshape as you cursor through. * gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Implement virtual cursor position when moving vertically with the arrow keys and scrolling with page-up/page-down. (Arrow keys save only the X, scrolling saves both X and Y.) This means you can line-up / line-down or page-up / page-down without losing your place, and also that moving vertically with the cursor keys keeps the same X position, not the same character count: * gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Make vertical arrow keys move by display lines, not paragraphs. Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c: Make sure that the bin window is at least as big as the allocation. (Should we also make sure that the bin window is big enough to completely cover widget->window?) * gtk/gtktextview.c (gtk_text_view_get_visible_rect): Add function to get the onscreen rectangle. * gdk/x11/gdkwindow-x11.c (gdk_window_get_pointer): Correctly account for offsets in window coordinates. Sun Apr 16 16:13:27 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_get_cursor_locations): Fix index/offset confusion. * gtk/gtktextview.c (gtk_text_view_ensure_layout): Set the default direction from the widget direction. * gtk/gtktexttag.c gtk/gtktexttagprivate.h (gtk_text_tag_set_arg): Add a "direction" attribute. * gtk/gtktextview.c: global s/tkxt/text_view/. * gtk/testtext.c: Added long block of text in Arabic, to test out the direction attributes. (Some problems with the shaping system for arabic become obvious - like the fact the cursor splits words into unjoined pieces.) Fri Apr 14 12:54:34 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextdisplay.c (render_layout): Add overstrike handling. * gtk/gtktextlayout.c: Fix up alignment. * gtk/testtext.c: Add some tests for centering, wrapping. Fri Apr 14 09:26:22 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c: Add a draw_glyphs() operation to the drawable vtable and gdk_draw_glyphs(). If we wrote GTK+-specific layout-render function this could just replace the draw_layout() operation in the vtable. * gtk/gtkentry.c: Move guts of gtk_entry_get_cursor_locations to pango_layout_get_cursor_pos() and use that function. * gtk/gtktextchild.[ch]: add gtk_ onto pixmap_segment_new(), since it is a non-static symbol. * gtk/gtktextbtree.[ch]: Replace gtk_text_btree_find_line_data_by_y() with gtk_text_btree_find_line_by_y() * gtk/gtktextdisplay.c: Rewrote for Pango - uses a custom layout renderer that handles GtkTextAppearance attributes. * gtk/gtktexttag.[ch] gtk/gtktexttagprivate.h: - Move the values in the style that don't affect geometry into a GtkTextAppearance structure. - Change underline to take a PangoUnderline and "font" a string representation of a font description - Add a "font_desc" attribute which takes a FontDescription structure. * gtk/gtktextlayout.[ch]: - Get rid of the display-line list per each line. Instead, we generate, on demand, a GtkTextLineDisplay structure which] contains a PangoLayout * and other necesary information (offsets, cursor locations) for displaying a paragraph. - Get rid of the code to wrap lines, create display chunks, etc. Instead, we just go through a paragraph and convert it into the necessary inputs to a PangoLayout. - Implement a new attribute type, GtkTextAttrAppearance. This holds a GtkTextAppearance, and is used to pass colors, stipple, etc, through from the layout to the display without having to use lots and lots of individual attributes. - Reimplement gtk_layout_get_iter_at_pixel() gtk_layout_get_iter_pos() in terms of PangoLayout functions. * gtk/gtktextview.c: - Handle passing the necessary PangoContext to the layout - Some fixups in painting to deal with the automatic backing store and offsetting of GTK+-1.4 - Add a style_set handler so that the default style reacts properly to theme changes. * gtk/gtktext?*.[ch]: Random code-style fixes. * gtk/testtext.c: Substitute in languages that Pango handles now for Thai Mon Apr 10 10:33:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktext?*.[ch]: Check in Havoc's port of the Tk text widget, in original form preparatory to Pango-ization and gdkimcontext-ization. Thu Apr 6 19:25:39 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontext.c: Move default implementations to real_* vfuncs, so that we can derive from gtkimcontext in language bindings properly. Thu Apr 6 16:02:52 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontextsimple.[ch]: Use gdk_keyval_to_unicode to gdk_unicode_to_keyval. Add a compose table including (almost) all the compose combinations from X. This is 6k of static, shared data as opposed to 50k or so of dynamic data in the XIM implementation. * gdk/gdk.h gdk/gdkkeyuni.c gdk/win32/gdkevents-win32.c (gdk_keyval_to_unicode, gdk_unicode_to_keyval): Moved functions to convert keyvalues from and to unicode here from the win32 port and made them public. Wed Apr 5 16:37:29 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkeditable.c (gtk_editable_insert_text): Allow new_text_length == -1. Wed Apr 5 16:27:45 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontext.[ch]: Base class for new input context system * gtk/gtkimmulticontext.[ch]: Proxy input context that allows the real input context implementation to be loaded from modules and switched on the fly. * gtk/gtkcontextsimple.[ch]: Simple implementation of an input context that just does direct keysymbol => unicode translation. * gtk/gtkentry.[ch]: Start switching editing over to using GtkInputContext. (No handling of preedit yet.) Wed Apr 5 15:48:41 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktypeutils.h (GTK_CHECK_GET_CLASS): Fix problem with one too many substitutions. (klass should not be subsituted.) Wed Apr 5 00:18:14 2000 Owen Taylor <otaylor@redhat.com> * configure.in: Add checks for Pango * configure.in docs/Makefile.am: Add test for sgml2html and allow 'make dist' without building html, but print out warnings in that case. (For making snapshots) * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: Add Pango libraries and C flags * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: Add function (gdk_draw_layout) to draw a pango layout. * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions for getting Pango contexts for GDK. * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional editing. * gtk/gtkentry.c: Hack in simple Hebrew input with direct keysym => unicode translations. More languages can be added here, but real input-method support is needed. * docs/Changes-1.4.txt: Added note about entry behavior. * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions to set the reading direction for a widget and the global direction. Add test which allows toggling the global direction. Two private flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, underlining now handled by Pango. * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription to RCStyle and Style. (Having both this and the old font name and GdkFont is temporary.) * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added convenience functions for creating contexts and layouts for widgets. * gtk/testgtk.c: Enhance label tests with multilingual labels.
2000-06-02 03:14:07 +00:00
#define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20)
/**
* GDK_EVENT_PROPAGATE:
*
* Use this macro as the return value for continuing the propagation of
* an event handler.
*
* Since: 3.4
*/
#define GDK_EVENT_PROPAGATE (FALSE)
/**
* GDK_EVENT_STOP:
*
* Use this macro as the return value for stopping the propagation of
* an event handler.
*
* Since: 3.4
*/
#define GDK_EVENT_STOP (TRUE)
/**
* GDK_BUTTON_PRIMARY:
*
* The primary button. This is typically the left mouse button, or the
* right button in a left-handed setup.
*
* Since: 3.4
*/
#define GDK_BUTTON_PRIMARY (1)
/**
* GDK_BUTTON_MIDDLE:
*
* The middle button.
*
* Since: 3.4
*/
#define GDK_BUTTON_MIDDLE (2)
/**
* GDK_BUTTON_SECONDARY:
*
* The secondary button. This is typically the right mouse button, or the
* left button in a left-handed setup.
*
* Since: 3.4
*/
#define GDK_BUTTON_SECONDARY (3)
typedef struct _GdkEventAny GdkEventAny;
typedef struct _GdkEventExpose GdkEventExpose;
typedef struct _GdkEventVisibility GdkEventVisibility;
typedef struct _GdkEventMotion GdkEventMotion;
typedef struct _GdkEventButton GdkEventButton;
typedef struct _GdkEventTouch GdkEventTouch;
typedef struct _GdkEventScroll GdkEventScroll;
typedef struct _GdkEventKey GdkEventKey;
typedef struct _GdkEventFocus GdkEventFocus;
typedef struct _GdkEventCrossing GdkEventCrossing;
typedef struct _GdkEventConfigure GdkEventConfigure;
typedef struct _GdkEventProperty GdkEventProperty;
typedef struct _GdkEventSelection GdkEventSelection;
typedef struct _GdkEventOwnerChange GdkEventOwnerChange;
typedef struct _GdkEventProximity GdkEventProximity;
typedef struct _GdkEventDND GdkEventDND;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
typedef struct _GdkEventWindowState GdkEventWindowState;
typedef struct _GdkEventSetting GdkEventSetting;
typedef struct _GdkEventGrabBroken GdkEventGrabBroken;
typedef struct _GdkEventSequence GdkEventSequence;
typedef union _GdkEvent GdkEvent;
/**
* GdkEventFunc:
* @event: the #GdkEvent to process.
* @data: (closure): user data set when the event handler was installed with
* gdk_event_handler_set().
*
* Specifies the type of function passed to gdk_event_handler_set() to
* handle all GDK events.
*/
typedef void (*GdkEventFunc) (GdkEvent *event,
gpointer data);
/* Event filtering */
/**
* GdkXEvent:
*
* Used to represent native events (XEvents for the X11
* backend, MSGs for Win32).
*/
typedef void GdkXEvent; /* Can be cast to window system specific
* even type, XEvent on X11, MSG on Win32.
*/
/**
* GdkFilterReturn:
* @GDK_FILTER_CONTINUE: event not handled, continue processing.
* @GDK_FILTER_TRANSLATE: native event translated into a GDK event and stored
2014-02-04 23:21:13 +00:00
* in the `event` structure that was passed in.
* @GDK_FILTER_REMOVE: event handled, terminate processing.
*
* Specifies the result of applying a #GdkFilterFunc to a native event.
*/
typedef enum {
GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
GDK_FILTER_TRANSLATE, /* Native event translated into a GDK event and
stored in the "event" structure that was
passed in */
GDK_FILTER_REMOVE /* Terminate processing, removing event */
} GdkFilterReturn;
/**
* GdkFilterFunc:
* @xevent: the native event to filter.
* @event: the GDK event to which the X event will be translated.
* @data: (closure): user data set when the filter was installed.
*
* Specifies the type of function used to filter native events before they are
* converted to GDK events.
*
* When a filter is called, @event is unpopulated, except for
2014-02-04 23:21:13 +00:00
* `event->window`. The filter may translate the native
* event to a GDK event and store the result in @event, or handle it without
* translation. If the filter translates the event and processing should
* continue, it should return %GDK_FILTER_TRANSLATE.
*
* Returns: a #GdkFilterReturn value.
*/
typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
GdkEvent *event,
gpointer data);
/**
* GdkEventType:
* @GDK_NOTHING: a special code to indicate a null event.
* @GDK_DELETE: the window manager has requested that the toplevel window be
* hidden or destroyed, usually when the user clicks on a special icon in the
* title bar.
* @GDK_DESTROY: the window has been destroyed.
* @GDK_EXPOSE: all or part of the window has become visible and needs to be
* redrawn.
* @GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
* @GDK_BUTTON_PRESS: a mouse button has been pressed.
* @GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
* within a short period of time). Note that each click also generates a
* %GDK_BUTTON_PRESS event.
* @GDK_DOUBLE_BUTTON_PRESS: alias for %GDK_2BUTTON_PRESS, added in 3.6.
* @GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
* of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
* @GDK_TRIPLE_BUTTON_PRESS: alias for %GDK_3BUTTON_PRESS, added in 3.6.
* @GDK_BUTTON_RELEASE: a mouse button has been released.
* @GDK_KEY_PRESS: a key has been pressed.
* @GDK_KEY_RELEASE: a key has been released.
* @GDK_ENTER_NOTIFY: the pointer has entered the window.
* @GDK_LEAVE_NOTIFY: the pointer has left the window.
* @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
* @GDK_CONFIGURE: the size, position or stacking order of the window has changed.
* Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
* @GDK_MAP: the window has been mapped.
* @GDK_UNMAP: the window has been unmapped.
* @GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
* @GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
* @GDK_SELECTION_REQUEST: another application has requested a selection.
* @GDK_SELECTION_NOTIFY: a selection has been received.
* @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
* surface (e.g. a touchscreen or graphics tablet).
* @GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
* surface.
* @GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
* @GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
* @GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
* progress.
* @GDK_DRAG_STATUS: the status of the drag operation initiated by the window
* has changed.
* @GDK_DROP_START: a drop operation onto the window has started.
* @GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
* @GDK_CLIENT_EVENT: a message has been received from another application.
* @GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
* @GDK_SCROLL: the scroll wheel was turned
* @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
* for the possible window states
* @GDK_SETTING: a setting has been modified.
* @GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
* was added in 2.6
* @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
* was added in 2.8.
* @GDK_DAMAGE: the content of the window has been changed. This event type
* was added in 2.14.
* @GDK_TOUCH_BEGIN: A new touch event sequence has just started. This event
* type was added in 3.4.
* @GDK_TOUCH_UPDATE: A touch event sequence has been updated. This event type
* was added in 3.4.
* @GDK_TOUCH_END: A touch event sequence has finished. This event type
* was added in 3.4.
* @GDK_TOUCH_CANCEL: A touch event sequence has been canceled. This event type
* was added in 3.4.
* @GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
*
* Specifies the type of the event.
*
* Do not confuse these events with the signals that GTK+ widgets emit.
* Although many of these events result in corresponding signals being emitted,
* the events are often transformed or filtered along the way.
*
* In some language bindings, the values %GDK_2BUTTON_PRESS and
* %GDK_3BUTTON_PRESS would translate into something syntactically
2014-02-04 23:21:13 +00:00
* invalid (eg `Gdk.EventType.2ButtonPress`, where a
* symbol is not allowed to start with a number). In that case, the
* aliases %GDK_DOUBLE_BUTTON_PRESS and %GDK_TRIPLE_BUTTON_PRESS can
* be used instead.
*/
typedef enum
{
GDK_NOTHING = -1,
GDK_DELETE = 0,
GDK_DESTROY = 1,
GDK_EXPOSE = 2,
GDK_MOTION_NOTIFY = 3,
GDK_BUTTON_PRESS = 4,
GDK_2BUTTON_PRESS = 5,
GDK_DOUBLE_BUTTON_PRESS = GDK_2BUTTON_PRESS,
GDK_3BUTTON_PRESS = 6,
GDK_TRIPLE_BUTTON_PRESS = GDK_3BUTTON_PRESS,
GDK_BUTTON_RELEASE = 7,
GDK_KEY_PRESS = 8,
GDK_KEY_RELEASE = 9,
GDK_ENTER_NOTIFY = 10,
GDK_LEAVE_NOTIFY = 11,
GDK_FOCUS_CHANGE = 12,
GDK_CONFIGURE = 13,
GDK_MAP = 14,
GDK_UNMAP = 15,
GDK_PROPERTY_NOTIFY = 16,
GDK_SELECTION_CLEAR = 17,
GDK_SELECTION_REQUEST = 18,
GDK_SELECTION_NOTIFY = 19,
GDK_PROXIMITY_IN = 20,
GDK_PROXIMITY_OUT = 21,
GDK_DRAG_ENTER = 22,
GDK_DRAG_LEAVE = 23,
GDK_DRAG_MOTION = 24,
GDK_DRAG_STATUS = 25,
GDK_DROP_START = 26,
GDK_DROP_FINISHED = 27,
GDK_CLIENT_EVENT = 28,
GDK_VISIBILITY_NOTIFY = 29,
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
GDK_SETTING = 33,
GDK_OWNER_CHANGE = 34,
Bug 318807 – Offscreen windows and window redirection. 2008-03-18 10:49:20 Tim Janik <timj@imendio.com> * Applied pixmap redirection patch by Alexander Larsson with various updates from: Bug 318807 – Offscreen windows and window redirection. Updates: * updated docs to mention "Since 2.16". * tests/testgtk.c: fixed snapshooting pixmap leak. convert pixmap to pixbuf after snapshooting, to compensate for different bit depths (occurs when snapshooting ARGB visuals and displaying the pixmap in an RGB visual). * gdk/gdkwindow.[hc]: made GdkWindowRedirect private. * gdk/gdkwindow.c: removed damage idle handler, there's no aparent need for it. enqueue damage notification as GDK_DAMAGE events for each painting redirection at the start of the event queue. consider windows with a redirection fully visible when invalidating, and when updating from backing store. cleaned up stale variables. * gdk/gdkevents.c: added _gdk_event_queue_prepend(). * gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve, tree, drawingarea, text, handlebox, etc. clip the redirected window hierarchy to window sizes, the visible rectangles don't need to be taken into account here. extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable() in case pixmap visuals could mismatch. * gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect(). Base patch: * tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting of possibly obscured widgets into an offscreen pixmap. * gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap. * gtk/gtkmain.c: dispatch GDK_DAMAGE events. * gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent() implementations here, adapted them to propagate redirects to child windows. gdk_window_end_paint(): copy repainted window contents to redirection pixmap, clipped to visible region. queue GDK_DAMAGE event delivery. gdk_window_redirect_to_drawable(): install window painting redirection. gdk_window_remove_redirection(): remove previously installed redirection. * gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(), renamed _gdk_window_new() and _gdk_window_reparent(). * gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export gdk_window_redirect_to_drawable() and gdk_window_remove_redirection(). * gdk/gdkevents.h: added GDK_DAMAGE event type. * gdk/gdkevents.c: extract time and state from GDK_DAMAGE events. * gdk/gdkinternals.h: added internal prototypes. svn path=/trunk/; revision=20122
2008-05-21 19:04:24 +00:00
GDK_GRAB_BROKEN = 35,
GDK_DAMAGE = 36,
GDK_TOUCH_BEGIN = 37,
GDK_TOUCH_UPDATE = 38,
GDK_TOUCH_END = 39,
GDK_TOUCH_CANCEL = 40,
GDK_EVENT_LAST /* helper variable for decls */
} GdkEventType;
/**
* GdkVisibilityState:
* @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.
*
* Specifies the visiblity status of a window for a #GdkEventVisibility.
*/
typedef enum
{
GDK_VISIBILITY_UNOBSCURED,
GDK_VISIBILITY_PARTIAL,
GDK_VISIBILITY_FULLY_OBSCURED
} GdkVisibilityState;
/**
* GdkScrollDirection:
* @GDK_SCROLL_UP: the window is scrolled up.
* @GDK_SCROLL_DOWN: the window is scrolled down.
* @GDK_SCROLL_LEFT: the window is scrolled to the left.
* @GDK_SCROLL_RIGHT: the window is scrolled to the right.
* @GDK_SCROLL_SMOOTH: the scrolling is determined by the delta values
* in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4
*
* Specifies the direction for #GdkEventScroll.
*/
typedef enum
{
GDK_SCROLL_UP,
GDK_SCROLL_DOWN,
GDK_SCROLL_LEFT,
GDK_SCROLL_RIGHT,
GDK_SCROLL_SMOOTH
} GdkScrollDirection;
/**
* GdkNotifyType:
* @GDK_NOTIFY_ANCESTOR: the window is entered from an ancestor or
* left towards an ancestor.
* @GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an
* inferior of the window.
* @GDK_NOTIFY_INFERIOR: the window is entered from an inferior or
* left towards an inferior.
* @GDK_NOTIFY_NONLINEAR: the window is entered from or left towards
* a window which is neither an ancestor nor an inferior.
* @GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two windows
* which are not ancestors of each other and the window is part of
* the ancestor chain between one of these windows and their least
* common ancestor.
* @GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
*
* Specifies the kind of crossing for #GdkEventCrossing.
*
* See the X11 protocol specification of LeaveNotify for
* full details of crossing event generation.
*/
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;
/**
* GdkCrossingMode:
* @GDK_CROSSING_NORMAL: crossing because of pointer motion.
* @GDK_CROSSING_GRAB: crossing because a grab is activated.
* @GDK_CROSSING_UNGRAB: crossing because a grab is deactivated.
* @GDK_CROSSING_GTK_GRAB: crossing because a GTK+ grab is activated.
* @GDK_CROSSING_GTK_UNGRAB: crossing because a GTK+ grab is deactivated.
* @GDK_CROSSING_STATE_CHANGED: crossing because a GTK+ widget changed
* state (e.g. sensitivity).
* @GDK_CROSSING_TOUCH_BEGIN: crossing because a touch sequence has begun,
* this event is synthetic as the pointer might have not left the window.
* @GDK_CROSSING_TOUCH_END: crossing because a touch sequence has ended,
* this event is synthetic as the pointer might have not left the window.
* @GDK_CROSSING_DEVICE_SWITCH: crossing because of a device switch (i.e.
* a mouse taking control of the pointer after a touch device), this event
2014-02-07 18:32:47 +00:00
* is synthetic as the pointer didnt leave the window.
*
* Specifies the crossing mode for #GdkEventCrossing.
*/
typedef enum
{
GDK_CROSSING_NORMAL,
GDK_CROSSING_GRAB,
GDK_CROSSING_UNGRAB,
GDK_CROSSING_GTK_GRAB,
GDK_CROSSING_GTK_UNGRAB,
GDK_CROSSING_STATE_CHANGED,
GDK_CROSSING_TOUCH_BEGIN,
GDK_CROSSING_TOUCH_END,
GDK_CROSSING_DEVICE_SWITCH
} GdkCrossingMode;
/**
* GdkPropertyState:
* @GDK_PROPERTY_NEW_VALUE: the property value was changed.
* @GDK_PROPERTY_DELETE: the property was deleted.
*
* Specifies the type of a property change for a #GdkEventProperty.
*/
typedef enum
{
GDK_PROPERTY_NEW_VALUE,
GDK_PROPERTY_DELETE
} GdkPropertyState;
/**
* GdkWindowState:
* @GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
* @GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
* @GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
* @GDK_WINDOW_STATE_STICKY: the window is sticky.
* @GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without
* decorations.
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
* @GDK_WINDOW_STATE_TILED: the window is in a tiled state, Since 3.10
*
* Specifies the state of a toplevel window.
*/
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
typedef enum
{
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6,
GDK_WINDOW_STATE_FOCUSED = 1 << 7,
GDK_WINDOW_STATE_TILED = 1 << 8
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
} GdkWindowState;
/**
* GdkSettingAction:
* @GDK_SETTING_ACTION_NEW: a setting was added.
* @GDK_SETTING_ACTION_CHANGED: a setting was changed.
* @GDK_SETTING_ACTION_DELETED: a setting was deleted.
*
* Specifies the kind of modification applied to a setting in a
* #GdkEventSetting.
*/
typedef enum
{
GDK_SETTING_ACTION_NEW,
GDK_SETTING_ACTION_CHANGED,
GDK_SETTING_ACTION_DELETED
} GdkSettingAction;
/**
* GdkOwnerChange:
* @GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
* @GDK_OWNER_CHANGE_DESTROY: the window was destroyed
* @GDK_OWNER_CHANGE_CLOSE: the client was closed
*
* Specifies why a selection ownership was changed.
*/
typedef enum
{
GDK_OWNER_CHANGE_NEW_OWNER,
GDK_OWNER_CHANGE_DESTROY,
GDK_OWNER_CHANGE_CLOSE
} GdkOwnerChange;
/**
* GdkEventAny:
* @type: the type of the event.
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
*
* Contains the fields which are common to all event structs.
* Any event pointer can safely be cast to a pointer to a #GdkEventAny to
* access these fields.
*/
struct _GdkEventAny
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
};
/**
* GdkEventExpose:
* @type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @area: bounding box of @region.
* @region: the region that needs to be redrawn.
* @count: the number of contiguous %GDK_EXPOSE events following this one.
2014-02-05 19:50:22 +00:00
* The only use for this is exposure compression, i.e. handling all
* contiguous %GDK_EXPOSE events in one go, though GDK performs some
* exposure compression so this is not normally needed.
*
* Generated when all or part of a window becomes visible and needs to be
* redrawn.
*/
struct _GdkEventExpose
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkRectangle area;
cairo_region_t *region;
gint count; /* If non-zero, how many more events follow. */
};
/**
* GdkEventVisibility:
* @type: the type of the event (%GDK_VISIBILITY_NOTIFY).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
* %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
*
* Generated when the window visibility status has changed.
*
* Deprecated: 3.12: Modern composited windowing systems with pervasive
* transparency make it impossible to track the visibility of a window
* reliably, so this event can not be guaranteed to provide useful
* information.
*/
struct _GdkEventVisibility
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkVisibilityState state;
};
/**
* GdkEventMotion:
* @type: the type of the event.
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @x: the x coordinate of the pointer relative to the window.
* @y: the y coordinate of the pointer relative to the window.
* @axes: @x, @y translated to the axes of @device, or %NULL if @device is
* the mouse.
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @is_hint: set to 1 if this event is just a hint, see the
* %GDK_POINTER_MOTION_HINT_MASK value of #GdkEventMask.
* @device: the master device that the event originated from. Use
* gdk_event_get_source_device() to get the slave device.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen.
* @y_root: the y coordinate of the pointer relative to the root of the
* screen.
*
* Generated when the pointer moves.
*/
struct _GdkEventMotion
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
gdouble *axes;
guint state;
gint16 is_hint;
GdkDevice *device;
gdouble x_root, y_root;
};
/**
* GdkEventButton:
* @type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
* %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @x: the x coordinate of the pointer relative to the window.
* @y: the y coordinate of the pointer relative to the window.
* @axes: @x, @y translated to the axes of @device, or %NULL if @device is
* the mouse.
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @button: the button which was pressed or released, numbered from 1 to 5.
* Normally button 1 is the left mouse button, 2 is the middle button,
* and 3 is the right button. On 2-button mice, the middle button can
* often be simulated by pressing both mouse buttons together.
* @device: the master device that the event originated from. Use
* gdk_event_get_source_device() to get the slave device.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen.
* @y_root: the y coordinate of the pointer relative to the root of the
* screen.
*
* Used for button press and button release events. The
* @type field will be one of %GDK_BUTTON_PRESS,
* %GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE,
*
* Double and triple-clicks result in a sequence of events being received.
* For double-clicks the order of events will be:
2014-02-05 00:45:36 +00:00
*
* - %GDK_BUTTON_PRESS
* - %GDK_BUTTON_RELEASE
* - %GDK_BUTTON_PRESS
* - %GDK_2BUTTON_PRESS
* - %GDK_BUTTON_RELEASE
*
* Note that the first click is received just like a normal
* button press, while the second click results in a %GDK_2BUTTON_PRESS
* being received just after the %GDK_BUTTON_PRESS.
*
* Triple-clicks are very similar to double-clicks, except that
* %GDK_3BUTTON_PRESS is inserted after the third click. The order of the
* events is:
2014-02-05 00:45:36 +00:00
*
* - %GDK_BUTTON_PRESS
* - %GDK_BUTTON_RELEASE
* - %GDK_BUTTON_PRESS
* - %GDK_2BUTTON_PRESS
* - %GDK_BUTTON_RELEASE
* - %GDK_BUTTON_PRESS
* - %GDK_3BUTTON_PRESS
* - %GDK_BUTTON_RELEASE
*
* For a double click to occur, the second button press must occur within
* 1/4 of a second of the first. For a triple click to occur, the third
* button press must also occur within 1/2 second of the first button press.
*/
struct _GdkEventButton
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
gdouble *axes;
guint state;
guint button;
GdkDevice *device;
gdouble x_root, y_root;
};
/**
* GdkEventTouch:
* @type: the type of the event (%GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE,
* %GDK_TOUCH_END, %GDK_TOUCH_CANCEL)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @x: the x coordinate of the pointer relative to the window
* @y: the y coordinate of the pointer relative to the window
* @axes: @x, @y translated to the axes of @device, or %NULL if @device is
* the mouse
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType
* @sequence: the event sequence that the event belongs to
* @emulating_pointer: whether the event should be used for emulating
* pointer event
* @device: the master device that the event originated from. Use
* gdk_event_get_source_device() to get the slave device.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen
* @y_root: the y coordinate of the pointer relative to the root of the
* screen
*
* Used for touch events.
* @type field will be one of %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE,
* %GDK_TOUCH_END or %GDK_TOUCH_CANCEL.
*
* Touch events are grouped into sequences by means of the @sequence
* field, which can also be obtained with gdk_event_get_event_sequence().
* Each sequence begins with a %GDK_TOUCH_BEGIN event, followed by
* any number of %GDK_TOUCH_UPDATE events, and ends with a %GDK_TOUCH_END
* (or %GDK_TOUCH_CANCEL) event. With multitouch devices, there may be
* several active sequences at the same time.
*/
struct _GdkEventTouch
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
gdouble *axes;
guint state;
GdkEventSequence *sequence;
gboolean emulating_pointer;
GdkDevice *device;
gdouble x_root, y_root;
};
/**
* GdkEventScroll:
* @type: the type of the event (%GDK_SCROLL).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @x: the x coordinate of the pointer relative to the window.
* @y: the y coordinate of the pointer relative to the window.
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @direction: the direction to scroll to (one of %GDK_SCROLL_UP,
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT, %GDK_SCROLL_RIGHT or
* %GDK_SCROLL_SMOOTH).
* @device: the master device that the event originated from. Use
* gdk_event_get_source_device() to get the slave device.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen.
* @y_root: the y coordinate of the pointer relative to the root of the
* screen.
2014-01-20 20:31:10 +00:00
* @delta_x: the x coordinate of the scroll delta
* @delta_y: the y coordinate of the scroll delta
*
* Generated from button presses for the buttons 4 to 7. Wheel mice are
* usually configured to generate button press events for buttons 4 and 5
* when the wheel is turned.
*
* Some GDK backends can also generate smooth scroll events, which
* can be recognized by the %GDK_SCROLL_SMOOTH scroll direction. For
* these, the scroll deltas can be obtained with
* gdk_event_get_scroll_deltas().
*/
struct _GdkEventScroll
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
guint state;
GdkScrollDirection direction;
GdkDevice *device;
gdouble x_root, y_root;
gdouble delta_x;
gdouble delta_y;
};
/**
* GdkEventKey:
* @type: the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @keyval: the key that was pressed or released. See the
* `gdk/gdkkeysyms.h` header file for a
* complete list of GDK key codes.
* @length: the length of @string.
* @string: a string containing an approximation of the text that
* would result from this keypress. The only correct way to handle text
* input of text is using input methods (see #GtkIMContext), so this
* field is deprecated and should never be used.
* (gdk_unicode_to_keyval() provides a non-deprecated way of getting
* an approximate translation for a key.) The string is encoded in the
* encoding of the current locale (Note: this for backwards compatibility:
* strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
* In some cases, the translation of the key code will be a single
* NUL byte, in which case looking at @length is necessary to distinguish
* it from the an empty translation.
* @hardware_keycode: the raw code of the key that was pressed or released.
* @group: the keyboard group.
* @is_modifier: a flag that indicates if @hardware_keycode is mapped to a
* modifier. Since 2.10
*
* Describes a key press or key release event.
*/
struct _GdkEventKey
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
guint state;
guint keyval;
gint length;
gchar *string;
guint16 hardware_keycode;
guint8 group;
guint is_modifier : 1;
};
/**
* GdkEventCrossing:
* @type: the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @subwindow: the window that was entered or left.
* @time: the time of the event in milliseconds.
* @x: the x coordinate of the pointer relative to the window.
* @y: the y coordinate of the pointer relative to the window.
* @x_root: the x coordinate of the pointer relative to the root of the screen.
* @y_root: the y coordinate of the pointer relative to the root of the screen.
* @mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
* %GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
* %GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
* and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
* never native.
* @detail: the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
* %GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
* %GDK_NOTIFY_NONLINEAR_VIRTUAL).
* @focus: %TRUE if @window is the focus window or an inferior.
* @state: (type GdkModifierType): a bit-mask representing the state of
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
*
* Generated when the pointer enters or leaves a window.
*/
struct _GdkEventCrossing
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkWindow *subwindow;
guint32 time;
gdouble x;
gdouble y;
gdouble x_root;
gdouble y_root;
GdkCrossingMode mode;
GdkNotifyType detail;
gboolean focus;
guint state;
};
/**
* GdkEventFocus:
* @type: the type of the event (%GDK_FOCUS_CHANGE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @in: %TRUE if the window has gained the keyboard focus, %FALSE if
* it has lost the focus.
*
* Describes a change of keyboard focus.
*/
struct _GdkEventFocus
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
gint16 in;
};
/**
* GdkEventConfigure:
* @type: the type of the event (%GDK_CONFIGURE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @x: the new x coordinate of the window, relative to its parent.
* @y: the new y coordinate of the window, relative to its parent.
* @width: the new width of the window.
* @height: the new height of the window.
*
* Generated when a window size or position has changed.
*/
struct _GdkEventConfigure
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
2000-03-28 01:24:44 +00:00
gint x, y;
gint width;
gint height;
};
/**
* GdkEventProperty:
* @type: the type of the event (%GDK_PROPERTY_NOTIFY).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @atom: the property that was changed.
* @time: the time of the event in milliseconds.
* @state: (type GdkPropertyState): whether the property was changed
* (%GDK_PROPERTY_NEW_VALUE) or deleted (%GDK_PROPERTY_DELETE).
*
* Describes a property change on a window.
*/
struct _GdkEventProperty
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkAtom atom;
guint32 time;
guint state;
};
/**
* GdkEventSelection:
* @type: the type of the event (%GDK_SELECTION_CLEAR,
* %GDK_SELECTION_NOTIFY or %GDK_SELECTION_REQUEST).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @selection: the selection.
* @target: the target to which the selection should be converted.
* @property: the property in which to place the result of the conversion.
* @time: the time of the event in milliseconds.
* @requestor: the window on which to place @property or %NULL if none.
*
* Generated when a selection is requested or ownership of a selection
* is taken over by another client application.
*/
struct _GdkEventSelection
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkAtom selection;
GdkAtom target;
GdkAtom property;
guint32 time;
GdkWindow *requestor;
};
/**
* GdkEventOwnerChange:
* @type: the type of the event (%GDK_OWNER_CHANGE).
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly.
* @owner: the new owner of the selection, or %NULL if there is none
* @reason: the reason for the ownership change as a #GdkOwnerChange value
* @selection: the atom identifying the selection
* @time: the timestamp of the event
* @selection_time: the time at which the selection ownership was taken
* over
*
* Generated when the owner of a selection changes. On X11, this
* information is only available if the X server supports the XFIXES
* extension.
*
* Since: 2.6
*/
struct _GdkEventOwnerChange
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkWindow *owner;
GdkOwnerChange reason;
GdkAtom selection;
guint32 time;
guint32 selection_time;
};
/**
* GdkEventProximity:
* @type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @time: the time of the event in milliseconds.
* @device: the master device that the event originated from. Use
* gdk_event_get_source_device() to get the slave device.
*
* Proximity events are generated when using GDKs wrapper for the
* XInput extension. The XInput extension is an add-on for standard X
* that allows you to use nonstandard devices such as graphics tablets.
* A proximity event indicates that the stylus has moved in or out of
* contact with the tablet, or perhaps that the users finger has moved
* in or out of contact with a touch screen.
*
* This event type will be used pretty rarely. It only is important for
* XInput aware programs that are drawing their own cursor.
*/
struct _GdkEventProximity
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
GdkDevice *device;
};
/**
* GdkEventSetting:
* @type: the type of the event (%GDK_SETTING).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
* %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
* @name: the name of the setting.
*
* Generated when a setting is modified.
*/
struct _GdkEventSetting
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkSettingAction action;
char *name;
};
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
/**
* GdkEventWindowState:
* @type: the type of the event (%GDK_WINDOW_STATE).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @changed_mask: mask specifying what flags have changed.
* @new_window_state: the new window state, a combination of
* #GdkWindowState bits.
*
* Generated when the state of a toplevel window changes.
*/
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
struct _GdkEventWindowState
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkWindowState changed_mask;
GdkWindowState new_window_state;
};
/**
* GdkEventGrabBroken:
* @type: the type of the event (%GDK_GRAB_BROKEN)
* @window: the window which received the event, i.e. the window
* that previously owned the grab
* @send_event: %TRUE if the event was sent explicitly.
* @keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
* grab was broken
* @implicit: %TRUE if the broken grab was implicit
* @grab_window: If this event is caused by another grab in the same
* application, @grab_window contains the new grab window. Otherwise
* @grab_window is %NULL.
*
* Generated when a pointer or keyboard grab is broken. On X11, this happens
* when the grab window becomes unviewable (i.e. it or one of its ancestors
* is unmapped), or if the same application grabs the pointer or keyboard
* again. Note that implicit grabs (which are initiated by button presses)
* can also cause #GdkEventGrabBroken events.
*
* Since: 2.8
*/
struct _GdkEventGrabBroken {
GdkEventType type;
GdkWindow *window;
gint8 send_event;
gboolean keyboard;
gboolean implicit;
GdkWindow *grab_window;
};
/**
* GdkEventDND:
* @type: the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
* %GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or
* %GDK_DROP_FINISHED).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly.
* @context: the #GdkDragContext for the current DND operation.
* @time: the time of the event in milliseconds.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
* @y_root: the y coordinate of the pointer relative to the root of the
* screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
*
* Generated during DND operations.
*/
struct _GdkEventDND {
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkDragContext *context;
guint32 time;
gshort x_root, y_root;
};
/**
* GdkEvent:
2014-01-20 20:28:06 +00:00
* @type: the #GdkEventType
* @any: a #GdkEventAny
* @expose: a #GdkEventExpose
* @visibility: a #GdkEventVisibility
* @motion: a #GdkEventMotion
* @button: a #GdkEventButton
* @touch: a #GdkEventTouch
* @scroll: a #GdkEventScroll
* @key: a #GdkEventKey
* @crossing: a #GdkEventCrossing
* @focus_change: a #GdkEventFocus
* @configure: a #GdkEventConfigure
* @property: a #GdkEventProperty
* @selection: a #GdkEventSelection
* @owner_change: a #GdkEventOwnerChange
* @proximity: a #GdkEventProximity
* @dnd: a #GdkEventDND
* @window_state: a #GdkEventWindowState
* @setting: a #GdkEventSetting
* @grab_broken: a #GdkEventGrabBroken
*
* A #GdkEvent contains a union of all of the event types,
* and allows access to the data fields in a number of ways.
*
* The event type is always the first field in all of the event types, and
* can always be accessed with the following code, no matter what type of
* event it is:
* |[<!-- language="C" -->
* GdkEvent *event;
* GdkEventType type;
*
* type = event->type;
* ]|
*
* To access other fields of the event, the pointer to the event
* can be cast to the appropriate event type, or the union member
* name can be used. For example if the event type is %GDK_BUTTON_PRESS
* then the x coordinate of the button press can be accessed with:
* |[<!-- language="C" -->
* GdkEvent *event;
* gdouble x;
*
* x = ((GdkEventButton*)event)->x;
* ]|
* or:
* |[<!-- language="C" -->
* GdkEvent *event;
* gdouble x;
*
* x = event->button.x;
* ]|
*/
union _GdkEvent
{
GdkEventType type;
GdkEventAny any;
GdkEventExpose expose;
GdkEventVisibility visibility;
GdkEventMotion motion;
GdkEventButton button;
GdkEventTouch touch;
GdkEventScroll scroll;
GdkEventKey key;
GdkEventCrossing crossing;
GdkEventFocus focus_change;
GdkEventConfigure configure;
GdkEventProperty property;
GdkEventSelection selection;
GdkEventOwnerChange owner_change;
GdkEventProximity proximity;
GdkEventDND dnd;
test the window state stuff 2001-02-26 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c: test the window state stuff * gtk/gtkwindow.c (gtk_window_present): new function, makes a window come to the user's attention as if it were just created (gtk_window_iconify): new function (gtk_window_deiconify): new function (gtk_window_stick): new function (gtk_window_unstick): new function (gtk_window_maximize): new function (gtk_window_unmaximize): new function * gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal * gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE * gdk/x11/gdkevents-x11.c: create window state events when appropriate (gdk_wmspec_supported): new function * gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle iconification before showing the window (gdk_window_deiconify): new function (gdk_window_stick): new function (gdk_window_unstick): new function (gdk_window_maximize): new function (gdk_window_unmaximize): new function * gdk/gdkwindow.c: store the window state in the window; change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of window->mapped. (gdk_window_get_state): return the current window state * gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE (gdk_event_get_state): handle GDK_WINDOW_STATE (gdk_synthesize_window_state): function to create the window state events * gdk/gdkevents.h (struct _GdkEventWindowState): new type of event, for changes to "window state" such as maximized, sticky, etc. * gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function, focuses a window * gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function, finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
GdkEventWindowState window_state;
GdkEventSetting setting;
GdkEventGrabBroken grab_broken;
};
GDK_AVAILABLE_IN_ALL
GType gdk_event_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_14
GType gdk_event_sequence_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
gboolean gdk_events_pending (void);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_event_get (void);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_event_peek (void);
GDK_AVAILABLE_IN_ALL
void gdk_event_put (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_event_new (GdkEventType type);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_event_copy (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
void gdk_event_free (GdkEvent *event);
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
GDK_AVAILABLE_IN_3_10
GdkWindow *gdk_event_get_window (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
guint32 gdk_event_get_time (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_state (const GdkEvent *event,
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
GdkModifierType *state);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_coords (const GdkEvent *event,
!GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. Thu Jun 28 23:53:31 2001 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_hide): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. * gtk/gtkmain.c (gtk_main_do_event): !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for post event delivery destruction upon GDK_DESTROY. * gtk/gtkwidget.c: added GtkWidget::event-after notification signal, to sompensate for former (pre-2.0) connect_after() facility. (gtk_widget_send_expose): (gtk_widget_event): assert the widget is realized, since event delivery to non-realized widgets is essentially a bug. event handlers should be able to unconditionally rely on widget->window (unless they emit events on their own which can trigger widget destruction). (gtk_widget_event_internal): removed old outdated GTK_OBJECT_DESTROYED() logic. event delivery happens as follows: a) emission of GtkWidget::event (RUN_LAST handler). returns was_handled. b) if !was_handled in (a) and the widget is still realized, emit event- specific signal (RUN_LAST handler). returns was_handled. c) emission of GtkWidget::event-after for notification if the widget is still realized (regardless of was_handled from previous stages, no class handler). no return value. d) was_handled gets passed on to caller, to determine further propagation. if the widget got unrealized meanwhile, was_handled is returned as TRUE. * gdk/gdkevents.[hc]: added gdk_event_get_root_coords() and gdk_event_get_coords().
2001-06-28 22:49:20 +00:00
gdouble *x_win,
gdouble *y_win);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_root_coords (const GdkEvent *event,
gdouble *x_root,
gdouble *y_root);
GDK_AVAILABLE_IN_3_2
gboolean gdk_event_get_button (const GdkEvent *event,
guint *button);
GDK_AVAILABLE_IN_3_2
gboolean gdk_event_get_click_count (const GdkEvent *event,
guint *click_count);
GDK_AVAILABLE_IN_3_2
gboolean gdk_event_get_keyval (const GdkEvent *event,
guint *keyval);
GDK_AVAILABLE_IN_3_2
gboolean gdk_event_get_keycode (const GdkEvent *event,
guint16 *keycode);
GDK_AVAILABLE_IN_3_2
gboolean gdk_event_get_scroll_direction (const GdkEvent *event,
GdkScrollDirection *direction);
GDK_AVAILABLE_IN_3_4
gboolean gdk_event_get_scroll_deltas (const GdkEvent *event,
gdouble *delta_x,
gdouble *delta_y);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_axis (const GdkEvent *event,
Port to GObject, can go back in gdk-pixbuf after setting up a 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c: Port to GObject, can go back in gdk-pixbuf after setting up a gdk-pixbuf-marshal.h header over there. * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g; (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal args (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be set (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons here, do it when we create the buttons later (gtk_tree_view_realize_buttons): add some g_return_if_fail (gtk_tree_view_map): paranoia checks that column->button is shown and unmapped (gtk_tree_view_size_request): only request visible children. Move header size calculation in here, for cleanliness, and to maintain invariants for child widgets if we eventually let users set different children inside the buttons (gtk_tree_view_map_buttons): factor out code to map buttons, since it was being called several times (gtk_tree_view_size_allocate_buttons): move_resize the drag windows instead of just moving them; their height may change if we allow random widgets in there, or the theme changes. (gtk_tree_view_size_allocate): move button size allocation above emitting the scroll signals, to ensure a sane state when we hit user code (gtk_tree_view_button_release): remove queue_resize after tree_view_set_size(), set_size() will handle any resize queuing that's needed (gtk_tree_view_focus_in): just queue a draw, don't fool with draw_focus goo (gtk_tree_view_focus): use gtk_get_current_event() and gdk_event_get_state() (gtk_tree_view_deleted): don't queue_resize() after calling set_size() (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove semicolon (gtk_tree_view_create_button): show the button here (gtk_tree_view_button_clicked): actually emit the clicked signal on the column (_gtk_tree_view_set_size): return right away if the size is unchanged, as a cheesy optimization (gtk_tree_view_setup_model): rename set_model_realized to setup_model to match the flag that indicates whether we've called it (gtk_tree_view_get_hadjustment): create adjustment if it doesn't exist, because set_scroll_adjustment does that and it shouldn't matter what order you call these in (gtk_tree_view_get_vadjustment): ditto (gtk_tree_view_set_headers_visible): canonicalize the bool, for paranoia (gtk_tree_view_set_headers_visible): call gtk_tree_view_map_buttons() instead of using cut-and-paste code (gtk_tree_view_append_column): clarify whether the return value is the count of columns before or after, and do the increment separately from the return statement so you can tell from the code. (gtk_tree_view_remove_column): ditto (gtk_tree_view_insert_column): ditto (gtk_tree_view_get_column): remove g_return_if_fail for columns outside the existing range, the docs say that outside-range columns are allowed, so we handle them as documented. (Presumably this allows a nice loop with column != NULL as test.) (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments mean (left/right/center etc.). (gtk_tree_view_collapse_all): only queue a draw if we're mapped (gtk_tree_view_expand_row): add docs (gtk_tree_view_collapse_row): add docs * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new function to emit the clicked signal on a column * gdk/gdkevents.c (gdk_event_get_state): new function, to get the state of an event (gdk_event_get_time): don't treat GDK_SCROLL as a button event, remove default case from switch so gcc will whine if we don't explicitly handle all event types * gtk/gtktreeselection.h: added some FIXME * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename "columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
GdkAxisUse axis_use,
gdouble *value);
GDK_AVAILABLE_IN_ALL
2010-05-25 22:38:44 +00:00
void gdk_event_set_device (GdkEvent *event,
GdkDevice *device);
GDK_AVAILABLE_IN_ALL
2010-05-25 22:38:44 +00:00
GdkDevice* gdk_event_get_device (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
void gdk_event_set_source_device (GdkEvent *event,
GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkDevice* gdk_event_get_source_device (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
void gdk_event_request_motions (const GdkEventMotion *event);
GDK_AVAILABLE_IN_3_4
gboolean gdk_event_triggers_context_menu (const GdkEvent *event);
2010-05-25 22:38:44 +00:00
GDK_AVAILABLE_IN_ALL
2010-05-25 22:38:44 +00:00
gboolean gdk_events_get_distance (GdkEvent *event1,
GdkEvent *event2,
gdouble *distance);
GDK_AVAILABLE_IN_ALL
2010-05-25 22:38:44 +00:00
gboolean gdk_events_get_angle (GdkEvent *event1,
GdkEvent *event2,
gdouble *angle);
GDK_AVAILABLE_IN_ALL
2010-05-25 22:38:44 +00:00
gboolean gdk_events_get_center (GdkEvent *event1,
GdkEvent *event2,
gdouble *x,
gdouble *y);
GDK_AVAILABLE_IN_ALL
void gdk_event_handler_set (GdkEventFunc func,
gpointer data,
GDestroyNotify notify);
GDK_AVAILABLE_IN_ALL
void gdk_event_set_screen (GdkEvent *event,
GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkScreen *gdk_event_get_screen (const GdkEvent *event);
GDK_AVAILABLE_IN_3_4
GdkEventSequence *gdk_event_get_event_sequence (const GdkEvent *event);
GDK_AVAILABLE_IN_3_10
GdkEventType gdk_event_get_event_type (const GdkEvent *event);
GDK_AVAILABLE_IN_ALL
2000-03-14 19:57:25 +00:00
void gdk_set_show_events (gboolean show_events);
GDK_AVAILABLE_IN_ALL
2000-03-14 19:57:25 +00:00
gboolean gdk_get_show_events (void);
GDK_AVAILABLE_IN_ALL
gboolean gdk_setting_get (const gchar *name,
GValue *value);
G_END_DECLS
#endif /* __GDK_EVENTS_H__ */