Compare commits

..

80 Commits

Author SHA1 Message Date
Tristan Van Berkom 54d44a9bd0 Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkplug.c
	gtk/gtkscrolledwindow.c
2010-08-30 14:56:28 +09:00
Tristan Van Berkom b3b22c31b9 Merge branch 'master' into native-layout 2010-08-21 12:38:55 -04:00
Tristan Van Berkom dd6aa6d1cf Merge branch 'master' into native-layout
Conflicts:
	tests/testheightforwidth.c
2010-08-18 20:03:24 -04:00
Tristan Van Berkom 4f47197d33 Removed unused variables. 2010-08-18 19:27:13 -04:00
Tristan Van Berkom 4a2905c34b Fixed gtk_cell_view_allocate() to allocate a fixed array size instead of using
a growing dynamic GArray in a loop.
2010-08-18 19:11:01 -04:00
Tristan Van Berkom 99babef4b8 Merge branch 'master' into native-layout 2010-08-18 15:43:40 -04:00
Tristan Van Berkom d25c4f9dc1 Added test to show wrapping text in combo boxes and menu items. 2010-08-18 15:23:46 -04:00
Tristan Van Berkom ddd32757be Fixed combo box's custom menu positioning function to work with new
height-for-width menus.
2010-08-18 15:17:22 -04:00
Tristan Van Berkom 4ff413f48d Added height-for-width geometry management to menus
Now menus can be height-for-width, for a menu to be
height for width it must have a width explicitly set
with gtk_widget_set_size_request()... if such a request
is set then menus will be allocated a smaller height
for the larger provided width (if you have any
wrapping content in the menu items)
2010-08-18 15:14:59 -04:00
Tristan Van Berkom 59aacd7935 Fixing accel label to do its thing in ->get_width() instead
of the old ->size_request()
2010-08-18 15:13:39 -04:00
Tristan Van Berkom 72856830e7 Merge branch 'master' into native-layout 2010-08-17 01:39:09 -04:00
Tristan Van Berkom 94f7cf0347 Fixed height-for-width implementation for combobox/cellview
Now the combo box requests height-for-width properly taking
into account all of its cells at request/allocation time.

Note an implementation of menu-items is needed to get the
the combo's drop-down menu to condense to a proper (smaller)
height when given enough width.
2010-08-17 01:33:11 -04:00
Tristan Van Berkom c4119e58cf Clipped values for gtk_distribute_natural_allocation() 2010-08-17 01:32:44 -04:00
Tristan Van Berkom 1b526bfcc1 Fixed cellrenderertext to always request a natural width >= minimum width. 2010-08-17 01:30:52 -04:00
Tristan Van Berkom 7d3cb3f9d9 Added an argument check to gtk_distribute_natural_allocation()
and clipped some values in gtkbox.c in case it was allocated less
than it requested.
2010-08-17 01:29:23 -04:00
Tristan Van Berkom 6a5f77a992 Merge branch 'master' into native-layout 2010-08-16 12:02:02 -04:00
Tristan Van Berkom 8740bd2faf Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkframe.c
	tests/testheightforwidth.c
2010-08-07 19:24:35 -04:00
Tristan Van Berkom 360e2c4dd5 Make GtkFrame allocate its label considering natural size requests
Also like the GtkExpander, the label widget is allocated the minimum
height for its allocated width and the remaining space is given to
the child, test case included.
2010-08-06 15:58:12 -04:00
Tristan Van Berkom fd66586b33 Pulling back some cleanup/changes from the incubator branch 2010-08-06 14:22:59 -04:00
Tristan Van Berkom add39dfea8 Merge branch 'master' into native-layout 2010-08-06 13:20:57 -04:00
Tristan Van Berkom a4086282c1 Fixed some merge problems (matching updates from the incubator branch) 2010-08-05 16:59:17 -04:00
Tristan Van Berkom c3da4007db Fixed merge problem 2010-08-05 16:55:35 -04:00
Tristan Van Berkom e569c77648 Removed useless struct definition (oops) 2010-08-05 16:54:13 -04:00
Tristan Van Berkom f0b205f40c Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkbox.c
	gtk/gtkcellrenderer.c
	gtk/gtkcellrenderertext.c
	gtk/gtkcellview.c
	gtk/gtkcombobox.c
	gtk/gtkexpander.c
	gtk/gtkiconview.c
	gtk/gtkplug.c
	gtk/gtkscrolledwindow.c
	gtk/gtksizerequest.c
	gtk/gtksocket.c
	gtk/gtktreeview.c
	gtk/gtktreeviewcolumn.c
	tests/testheightforwidth.c
2010-08-05 14:24:42 -04:00
Tristan Van Berkom a564e69e51 Merge branch 'master' into native-layout 2010-06-30 10:02:19 -04:00
Tristan Van Berkom 84e2a854dd Merge branch 'master' into native-layout
Conflicts:
	gtk/gtktreeview.c
2010-06-29 17:13:19 -04:00
Tristan Van Berkom 237d97dc25 Augmented the wrapping treeview test to include a scrolled window. 2010-06-29 17:06:53 -04:00
Tristan Van Berkom 6d47681722 GtkTreeview now watches the allocation of the parent scrolled window
at allocation time in order to detect possible feedback loops.

To avoid locking up the desktop some feedback protection is needed,
this patch is not the best but as far as I can see it does the job.
Ideally we should be looking into a GtkScrollable interface that
takes this height-for-width possibility into account.

The problem being that some height-for-width calculations at
allocation time are asynchronous and at some sizes cause the
height-for-width logic to compete with parent allocations
which change due to scrollbars toggling visiblity.

Specific considerations
  a.) The child treeview should not have knowlage of its parents
      allocation or the size of the scrollbars (this patch cheats
      that idealistic rule).
  b.) The parent scrolled window cannot safely determine if a child
      wants its size renegotiated based on a content change or based
      on a previous allocation
2010-06-29 17:01:13 -04:00
Tristan Van Berkom 0809e06881 Made scrolled windows forward along the height-for-width request in
the off-chance that both scrollbars are set to never appear.
2010-06-29 11:24:00 -04:00
Tristan Van Berkom 6d9d23009c Merge branch 'master' into native-layout 2010-06-27 18:40:20 -04:00
Tristan Van Berkom 93b76327ec Changed default window width of wrapping treeview height-for-width demo. 2010-06-27 18:37:53 -04:00
Tristan Van Berkom a30585167f Filtered GtkCellSizeRequest apis to explicitly return GtkCellRenderer fixed sizes if any are set. 2010-06-27 18:36:53 -04:00
Tristan Van Berkom deab62c29e Changed private api to allow setting a column dirty without resetting the width
(used when only the height is known to be dirty).
2010-06-27 18:35:54 -04:00
Tristan Van Berkom 02c37eb098 Fixed initial height of treeview when cells are wrapping to allocation.
This commit also adresses the refresh a little more gently and avoids
a lockup when resizing the 'editable cells' demo.
2010-06-27 18:33:56 -04:00
Tristan Van Berkom ea4d2f9a52 Merge branch 'master' into native-layout 2010-06-26 13:25:40 -04:00
Tristan Van Berkom bba9e3e070 Added test to demonstrate height-for-width tradeoffs in expander
labels.
2010-06-26 13:22:58 -04:00
Tristan Van Berkom 89a8f35b28 Implemented GtkSizeRequest interface on GtkExpander
In this particular case the label widget is never allocated
anything more than its natural width or its minimum height for
that width (thus prioritizing the content area to the label height).

We could allocate to the full available allocation but
  a.) focus would be drawn around the complete allocation
      instead of only the label
  b.) labels in expanders will need explicit alignments
2010-06-26 13:20:02 -04:00
Tristan Van Berkom c71bf29d24 Properly separated get_width/get_height code for GtkScrolledWindow
This makes sure only one direction of the children is queried at
a time (and the previous code had a bug when calculating the
extra space for scrollbars).
2010-06-26 13:18:04 -04:00
Tristan Van Berkom 1d0650f871 Merge branch 'master' into native-layout
Conflicts:
	gtk/gtktreeview.c
2010-06-25 12:25:28 -04:00
Tristan Van Berkom 9d97153738 Added test to demonstrate word-wrapping cell renderers in treeviews. 2010-06-24 19:23:45 -04:00
Tristan Van Berkom 86f360fec2 Merge branch 'master' into native-layout 2010-06-24 18:09:33 -04:00
Tristan Van Berkom f1998d568a Simulate gtk_cell_renderer_get_size() with height-for-width api
Same as GtkWidget does with GtkSizeRequestIface, this will allow
removal of the ->get_size() implementation for renderers that
implement the new api.
2010-06-24 18:09:08 -04:00
Tristan Van Berkom 9f3ad94e75 Fixed some faulty comparisons. 2010-06-24 18:09:08 -04:00
Tristan Van Berkom 4dbbcefe7c Fixed allocation of column buttons (was miscalculating padding). 2010-06-24 18:09:07 -04:00
Tristan Van Berkom 27065e257b Fixed treeview column allocations
Fixed allocations so that the column->width is not to
mention any padding taken into account by the treeview
(it's the allocated width of the column without padding/spacing).
2010-06-24 18:09:07 -04:00
Tristan Van Berkom fca8db084d Fixed treecolumn's get_width() implementation to report collective width
based on cached widths of all rows.
2010-06-24 18:09:07 -04:00
Tristan Van Berkom 103f3a6a18 Fixed cell renderer to properly export it's height-for-width implementation. 2010-06-24 18:09:07 -04:00
Paolo Borelli c683dffa9e Do not leak devices list in do_focus_change 2010-06-24 18:09:07 -04:00
noch ecedc58113 Added Armenian translation - po file. 2010-06-24 18:09:07 -04:00
noch 4a7c237b79 Modified Armenian translation - po file. 2010-06-24 18:09:07 -04:00
noch 2f2486bd5b Added Armenian translation - po file. Modified LINGUAS. 2010-06-24 18:09:07 -04:00
Javier Jardón ff82a56f28 [gtk] Add gtk_font_selection_dialog_get_font_selection()
This is needed to access the fontsel sealed member.
2010-06-24 18:09:07 -04:00
Javier Jardón f463059f00 [test] Exclude message-area as it's a object property 2010-06-24 18:09:07 -04:00
Javier Jardón 6d16148936 Add new api to gtk.symbols
Add newly added api gtk_accessible_set_widget() and
gtk_message_dialog_get_message_area()
2010-06-24 18:09:07 -04:00
Jorge González 92ae8ebb01 Updated Spanish translation 2010-06-24 18:09:06 -04:00
Javier Jardón 380120bda9 [gtkaccessible] Use the correct guards in gtk_accessible_set_widget()
Also, allow the widget variable to be NULL
2010-06-24 18:09:06 -04:00
Tor Lillqvist 2517035bc0 Generate correct grab broken event for WM_KILLFOCUS
WM_KILLFOCUS means that a keyboard grab (not a pointer grab), if any,
has been broken. I don't think this bug has matterd much as gtk
generates a grab-broken-event signal for both keybord and pointer
grabs being broken anyway.
2010-06-24 18:09:06 -04:00
Federico Mena Quintero 3651dc278d bgo#328069 - Add gtk_message_dialog_get_message_area()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-06-24 18:09:06 -04:00
Vincent Untz 2c7058bd13 bgo#622371 - Add gtk_accessible_set_widget() - the widget field was GSEAL()ed.
https://bugzilla.gnome.org/show_bug.cgi?id=622371
2010-06-24 18:09:06 -04:00
Chris Kühl ed639b211e [docs] Fixes issue with GtkEntryBuffer signal documentation 2010-06-24 18:09:06 -04:00
Murray Cumming 49f050a9bc gtkenums.h: Remove trailing comma to fix warning. 2010-06-24 18:09:06 -04:00
Tristan Van Berkom 51dadc0a1a Added test case to reflect natural size allocations in GtkTreeView and GtkTreeViewColumn 2010-06-23 18:02:05 -04:00
Tristan Van Berkom 1700cbe458 Implemented natural size allocations in GtkTreeView and GtkTreeViewColumn
This patch adds gtk_tree_view_column_allocate_width() to compute
the renderer allocation when the column width changes, furthermore
it effects treeview to allocate columns respecting their natural
widths (height-for-width requests still not effecting row heights).
2010-06-23 17:55:45 -04:00
Tristan Van Berkom ee097eb7ab Fixing debug build (s/extended layout/size request/ in GTK_NOTE flags). 2010-06-23 17:53:30 -04:00
Tristan Van Berkom 9f6c01c665 Refactored gtk_tree_view_column_cell_process_action() and removed
much redundant code.
2010-06-22 13:43:21 -04:00
Tristan Van Berkom 101ad51803 Added height-for-width apis to treeviewcolumn
Added get_natural_width() and get_height_for_width() apis
which need to be treated in a special way from treeview because
of the intricate nature of treeviews and thier requirements:
  - get_natural_width() must be called in the request phase for
    every row which will cache the ->requested_width and ->natural_width
  - get_height_for_width() must be called only after caching the widths
    for the entire view
2010-06-22 13:01:39 -04:00
Tristan Van Berkom 99f73c09f6 Revert "Fixed GtkSpinner to request 12x12 at init time instead of at expose time."
This reverts commit 0dff033a64.

That commit was introduced as a workaround to an erronous state
in the extended layout work, it was not merged into master and
this new commit backs it out from native-layout branch.
2010-06-20 14:30:03 -04:00
Tristan Van Berkom 7c66a29e87 Merge branch 'master' into native-layout 2010-06-20 14:23:14 -04:00
Tristan Van Berkom 0eff4061ab Some more gtk-doc corrections 2010-06-20 14:19:10 -04:00
Tristan Van Berkom 9653cf57b6 Make cell renderer's wrap to allocation. 2010-06-20 14:16:01 -04:00
Tristan Van Berkom 06a5095dc5 Created a _gtk_distribute_allocation() helper function for size allocators.
Migrated a portion of the GtkBox allocator loop to live in
a private function and be reused for distribution of space along
a single orientation.
2010-06-18 19:40:02 -04:00
Tristan Van Berkom ee9115fb9f Mass API change commit GtkExtendedCell --> GtkCellSizeRequest
This commit moves gtkextendedcell.[ch] --> gtkcellsizerequest.[ch]
and effects the API change all over the tree.

Furthermore it includes the initial height-for-width implementation
on GtkCellRendererText.
2010-06-18 17:07:03 -04:00
Tristan Van Berkom 33d3f72b98 More gtk-doc cleanup 2010-06-18 17:06:29 -04:00
Tristan Van Berkom 4ef145bda6 Merge branch 'master' into native-layout
Conflicts:
	gtk/Makefile.am
	gtk/gtk.h
	gtk/gtk.symbols
	gtk/gtksizerequest.c
2010-06-18 00:44:00 -04:00
Tristan Van Berkom 6e705d7087 Completed missing peices of the GtkExtendedCell api 2010-06-17 20:58:59 -04:00
Tristan Van Berkom c2abe27b03 Created _gtk_cell_renderer_calc_offset()
Created an internal helper to replace the meaningless 'cell_area',
'x_offset' and 'y_offset' from gtk_cell_renderer_get_size() which
will be deprecated in favor of the new h4w api. At this point GTK+
does no longer depend on renderers calculating this alignment and
its safe to change the calls to gtk_extended_cell_get_desired_size().
2010-06-17 20:58:59 -04:00
Tristan Van Berkom c20c3fd757 Mass api change from GtkExtendedLayout --> GtkSizeRequest part 2.
This commit makes the api change on the remaining portions of the
native-layout branch.
2010-06-17 20:41:01 -04:00
Tristan Van Berkom c5a0e04a8d Mass api change from GtkExtendedLayout --> GtkSizeGroup
This commit makes a few massive changes to the extended layout
code:
  a.) gtkextendedlayout.c --> gtksizerequest.c
  b.) _is_height_for_width --> get_request_mode()
  c.) get_desired_size(), get_desired_width(), get_desired_height() -->
      get_size(), get_width(), get_height()

This is the first partial commit and only effects portions
of the tree that have already been merged in master (in order to
easily cherry pick this commit).
2010-06-17 20:38:16 -04:00
Tristan Van Berkom f04f94e881 Merge branch 'master' into native-layout 2010-06-15 15:04:53 -04:00
Tristan Van Berkom 16715a662e Revert "Mega commit backing out everything from the native-layout branch that"
This reverts commit 2a5272647d.

Conflicts:

	gtk/gtk.symbols
	gtk/gtkextendedlayout.c
2010-06-11 15:44:56 -04:00
270 changed files with 28982 additions and 29119 deletions
-110
View File
@@ -1,113 +1,3 @@
Overview of Changes from GTK+ 2.90.6 to 2.90.7
==============================================
* Various deprecated APIs have been removed:
- the GtkWidget::draw-border style property
- the GtkEntry::state-hint style property
- the GtkTreeView::row-ending-details style property
- the GtkRange::trough-side-details style property
- the GtkRange::stepper-position-details style property
- the GtkRange::activate-slider style property
- the GTK_CALENDAR_WEEK_START_MONDAY option
- the GtkFrame::shadow and GtkHandleBox::shadow properties
- the GtkTextView::page-horizontally signal
- the GDK_WINDOW_DIALOG window type
- the GTK_SELECTION_EXTENDED selection mode
- the GtkProgressBarOrientation, GtkAnchorType and GtkVisibility
enumerations
- GtkDialog separators, including the GtkDialog::has-separator
property, including setter/getter, the GTK_DIALOG_NO_SEPARATOR
flag and the GtkMessageDialog::use-separator style property
- gtk_status_icon_set/get_blinking
- gdk_window_et_deskrelative_origin
- The GtkItem class has been removed. Its functionality has
been merged into is sole subclass, GtkMenuItem
* The GtkIconView::orientation property has been renamed
to 'item-orientation'
* GtkProgressBar and GtkCellRendererProgress implement GtkOrientable
now, and their 'orientation' property have been split into
a 'orientation' property of type GtkOrientation and a boolean
'inverted' property
* GDK no longer exports variables: gdk_threads_lock, gdk_threads_unlock,
gdk_threads_mutex and gdk_display are no longer available
* GTK no longer exports variables: gtk_major_version, gtk_minor_version,
gtk_micro_version, gtk_binary_age, gtk_interface_age have been
converted to functions. gtk_debug_flags has a getter and a setter.
Misc. variables that had been exported by the semi-private text
API have been removed.
* All GDK keysym names have been changed from GDK_keysym to GDK_KEY_keysym;
the previous names are still available in gdkkeysyms-compat.h.
* GtkWrapBox is a new container, which distributes its children
over multiple rows/columns
* GTK+ now uses standard icon names when looking up stock icons
* More widgets and cell renderers have been converted to support
width-for-height: GtkCellRendererText, GtkAccelLabel, GtkCellView,
GtkComboBox, GtkMenu, GtkMenuItem
* Button boxes are now semi-homogeneous.
* The directfb backend has been removed
* Bugs fixed:
77669 GtkWrapBox for gtk itself, not gimp?
84188 "Dialogue" button widths should not be homogenous
414712 gtk_container_set_focus_child leaks widget
527499 FileFilter combo becames too wide
528257 File selector and stock string problems
605186 Use G_DEFINE_INTERFACE macro
614006 File chooser crashes when creating a new folder...
616401 Noneffective gdk_keymap_map_virtual_modifiers in early use
626710 GailScaleButton calculates wrong value for minimum increment
627028 Marked state of calendar day is not accessible
627139 gtkfilechooserentry shows completion progress tooltip on first show
627445 Removal of GtkWidget::draw-border breaks gtk_widget_queue_draw()
627580 GtkFontSelection: don't notify the non-existent "font" property
627643 gtkaboutdialog gettext problem
627828 Drag and drop between treeviews in different window groups broken...
627843 set_active_iter doc: remove restriction on path length
627867 tests/testsocket is broken
627912 misprint in the desc. of "hover-expand" and "hover-selection"...
628160 introspection: Update to new scanner API
628308 docs referencing non existing icons
628656 _gdk_windowing_get_startup_notify_id memory leak
628807 Add more "reserved for expansion" fields to GtkWidgetClass
628808 Warn if a widget requests minimum size > natural size
628884 Use a bitfield for Widget::private_flags, ::state, ::saved_state
628935 add gtk_radio_button_join_group method for bindings
629110 gtk_spinner_accessible_get_type always returns null
* Translation updates
Arabic
Armenian
Brazilian Portuguese
British English
Bulgarian
Danish
Estonian
French
Galician
Hebrew
Hungarian
Indonesian
Kazakh
Norwegian bokmål
Norwegian Nynorsk
Portuguese
Serbian
Slovenian
Spanish
Telugu
Traditional Chinese
Overview of Changes from GTK+ 2.90.5 to 2.90.6
==============================================
+12 -3
View File
@@ -12,7 +12,7 @@ AC_PREREQ([2.62])
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [90])
m4_define([gtk_micro_version], [8])
m4_define([gtk_micro_version], [7])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -243,6 +243,10 @@ AC_ARG_ENABLE(rebuilds,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(visibility,
[AC_HELP_STRING([--disable-visibility],
[do not use ELF visibility attributes])],,
[enable_visibility=yes])
AC_ARG_WITH(xinput,
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
@@ -280,6 +284,11 @@ else
fi
if test "x$enable_visibility" = "xno"; then
GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
fi
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
[Define if debugging is enabled])
@@ -1534,7 +1543,7 @@ fi
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.9.5])
GOBJECT_INTROSPECTION_CHECK([0.9.0])
##################################################
# Checks for gtk-doc and docbook-tools
@@ -1737,4 +1746,4 @@ perf/Makefile
AC_OUTPUT
echo "configuration:
target: $gdktarget"
target: $gdktarget"
+1 -5
View File
@@ -124,11 +124,7 @@ about_cb (GtkAction *action,
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
PACKAGE_VERSION,
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ()),
"version", PACKAGE_VERSION,
"copyright", "(C) 1997-2009 The GTK+ Team",
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
+1 -1
View File
@@ -610,7 +610,7 @@ do_changedisplay (GtkWidget *do_widget)
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
GTK_WINDOW (do_widget),
0,
GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
"Change", GTK_RESPONSE_OK,
NULL);
+2 -2
View File
@@ -113,8 +113,8 @@ key_press_event (GtkWidget *text_view,
switch (event->keyval)
{
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_Return:
case GDK_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
gtk_text_buffer_get_insert (buffer));
+2 -2
View File
@@ -120,8 +120,8 @@ do_iconview_edit (GtkWidget *do_widget)
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
GTK_SELECTION_SINGLE);
gtk_icon_view_set_item_orientation (GTK_ICON_VIEW (icon_view),
GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_orientation (GTK_ICON_VIEW (icon_view),
GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_columns (GTK_ICON_VIEW (icon_view), 2);
gtk_icon_view_set_reorderable (GTK_ICON_VIEW (icon_view), TRUE);
+8 -8
View File
@@ -369,16 +369,16 @@ main (int argc, char **argv)
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
g_object_set (tag,
"font", "Sans 18",
NULL);
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
g_object_set (tag,
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
+2
View File
@@ -1006,6 +1006,7 @@ gdk_drag_context_get_type
<TITLE>X Window System Interaction</TITLE>
<FILE>x_interaction</FILE>
GDK_ROOT_WINDOW
GDK_DISPLAY
GDK_WINDOW_XDISPLAY
GDK_WINDOW_XID
GDK_PIXMAP_XDISPLAY
@@ -1076,6 +1077,7 @@ gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
<SUBSECTION Private>
gdk_display
GDK_HAVE_WCHAR_H
GDK_HAVE_WCTYPE_H
gdk_x11_pixmap_get_drawable_impl
+6 -5
View File
@@ -11,12 +11,13 @@ They appear in the <structfield>keyval</structfield> field of the
#GdkEventKey structure, which is passed to signal handlers for the
"key-press-event" and "key-release-event" signals.
The complete list of key values can be found in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file.
header file. <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> is not included in <filename>&lt;gdk/gdk.h&gt;</filename>,
it must be included independently, because the file is quite large.
</para>
<para>
Key values are regularly updated from the upstream X.org X11 implementation,
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
than XF86XK_ or XK_ (for older symbols).
so new values are added regularly. They will be prefixed with GDK_ rather than
XF86XK_ or XK_ (for older symbols).
</para>
<para>
Key values can be converted into a string representation using
@@ -29,7 +30,7 @@ gdk_keyval_is_lower(). Key values can be converted to upper or lower case
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
</para>
<para>
When it makes sense, key values can be converted to and from
When it makes sense, key values can be converted to and from
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
</para>
@@ -269,7 +270,7 @@ Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
<para>
Converts a key value into a symbolic name.
The names are the same as those in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
but without the leading "GDK_KEY_".
but without the leading "GDK_".
</para>
@keyval: a key value.
+7
View File
@@ -300,6 +300,13 @@ Leaves a critical region begun with gdk_threads_enter().
@void:
<!-- ##### VARIABLE gdk_threads_mutex ##### -->
<para>
The #GMutex used to implement the critical region for
gdk_threads_enter()/gdk_threads_leave().
</para>
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
<para>
+96 -96
View File
@@ -145,125 +145,125 @@ expand_content_files = \
# Images to copy into HTML directory
HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/help-about.png \
$(top_srcdir)/gtk/stock-icons/24/list-add.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-about.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-add.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-bold.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-bold.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-cancel.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-caps-lock-warning.png \
$(top_srcdir)/gtk/stock-icons/24/media-optical.png \
$(top_srcdir)/gtk/stock-icons/24/edit-clear.png \
$(top_srcdir)/gtk/stock-icons/24/window-close.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-cdrom.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-clear.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-close.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-connect.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-convert.png \
$(top_srcdir)/gtk/stock-icons/24/edit-copy.png \
$(top_srcdir)/gtk/stock-icons/24/edit-cut.png \
$(top_srcdir)/gtk/stock-icons/24/edit-delete.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-password.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-error.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-information.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-question.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-warning.png \
$(top_srcdir)/gtk/stock-icons/24/folder.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-copy.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-cut.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-delete.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-authentication.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-error.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-info.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-question.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-directory.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-disconnect.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd-multiple.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-edit.png \
$(top_srcdir)/gtk/stock-icons/24/system-run.png \
$(top_srcdir)/gtk/stock-icons/24/document-x-generic.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find-replace.png \
$(top_srcdir)/gtk/stock-icons/24/go-bottom.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-top.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-down.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-up.png \
$(top_srcdir)/gtk/stock-icons/24/drive-harddisk.png \
$(top_srcdir)/gtk/stock-icons/24/network-idle.png \
$(top_srcdir)/gtk/stock-icons/24/help-contents.png \
$(top_srcdir)/gtk/stock-icons/24/go-home.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-execute.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-file.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-find.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-find-and-replace.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-bottom.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-top.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-down.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-up.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-harddisk.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-network.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-help.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-home.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-index.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-italic.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-center.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-fill.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-left.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-right.png \
$(top_srcdir)/gtk/stock-icons/24/image-missing.png \
$(top_srcdir)/gtk/stock-icons/24/document-new.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-italic.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-center.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-fill.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-left.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-right.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-missing-image.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-new.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-no.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-ok.png \
$(top_srcdir)/gtk/stock-icons/24/document-open.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-open.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/edit-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \
$(top_srcdir)/gtk/stock-icons/24/document-print.png \
$(top_srcdir)/gtk/stock-icons/24/printer-error.png \
$(top_srcdir)/gtk/stock-icons/24/printer-paused.png \
$(top_srcdir)/gtk/stock-icons/24/document-print-preview.png \
$(top_srcdir)/gtk/stock-icons/24/printer-info.png \
$(top_srcdir)/gtk/stock-icons/24/printer-warning.png \
$(top_srcdir)/gtk/stock-icons/24/document-properties.png \
$(top_srcdir)/gtk/stock-icons/24/application-exit.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/view-refresh.png \
$(top_srcdir)/gtk/stock-icons/24/list-remove.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-floppy.png \
$(top_srcdir)/gtk/stock-icons/24/document-save.png \
$(top_srcdir)/gtk/stock-icons/24/document-save-as.png \
$(top_srcdir)/gtk/stock-icons/24/edit-select-all.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-error.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-paused.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-preview.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-report.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-properties.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-quit.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-refresh.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-remove.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-floppy.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-save.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-save-as.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-select-all.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-select-color.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-color-picker.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-font.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-ascending.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-descending.png \
$(top_srcdir)/gtk/stock-icons/24/tools-check-spelling.png \
$(top_srcdir)/gtk/stock-icons/24/process-stop.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-strikethrough.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-ascending.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-descending.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-spell-check.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-stop.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-strikethrough.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-underline.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-underline.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-rtl.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-yes.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-original.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-fit-best.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-in.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-out.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-pause.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-record.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-stop.png \
$(top_srcdir)/gtk/stock-icons/24/view-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/view-restore.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-100.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-fit.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-in.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-out.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-pause.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-record.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-stop.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-leave-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-info.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/assistant.png \
+11 -7
View File
@@ -330,8 +330,8 @@ How to compile GTK+ itself
<arg>--enable-debug=[no|minimum|yes]</arg>
</group>
<group>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
<arg>--disable-visibility</arg>
<arg>--enable-visibility</arg>
</group>
<group>
<arg>--disable-shm</arg>
@@ -398,7 +398,7 @@ How to compile GTK+ itself
<formalpara>
<title><systemitem>--enable-debug</systemitem></title>
<para>
Turns on various amounts of debugging support. Setting this to 'no'
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
@@ -415,11 +415,15 @@ How to compile GTK+ itself
</formalpara>
<formalpara>
<title><systemitem>--disable-Bsymbolic</systemitem> and
<systemitem>--enable-Bsymbolic</systemitem></title>
<title><systemitem>--disable-visibility</systemitem> and
<systemitem>--enable-visibility</systemitem></title>
<para>
The option <systemitem>--disable-Bsymbolic</systemitem>
turns off the use of the -Bsymbolic-functions linker flag.
The option <systemitem>--disable-visibility</systemitem>
turns off the use of ELF visibility attributes for linking
optimizations. This makes sense while changing GTK+ itself,
since the way in which GTK+ uses visibility attributes
forces a full rebuild of all source files for any header
modification.
</para>
</formalpara>
+1 -1
View File
@@ -307,7 +307,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtkbbox.xml" />
<xi:include href="xml/gtkhbbox.xml" />
<xi:include href="xml/gtkvbbox.xml" />
<xi:include href="xml/gtkwrapbox.xml" />
<xi:include href="xml/gtkfixed.xml" />
<xi:include href="xml/gtkpaned.xml" />
<xi:include href="xml/gtkhpaned.xml" />
@@ -369,6 +368,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<title>Abstract Base Classes</title>
<xi:include href="xml/gtkbin.xml" />
<xi:include href="xml/gtkcontainer.xml" />
<xi:include href="xml/gtkitem.xml" />
<xi:include href="xml/gtkmenushell.xml" />
<xi:include href="xml/gtkmisc.xml" />
<xi:include href="xml/gtkobject.xml" />
+27 -44
View File
@@ -594,7 +594,6 @@ gtk_calendar_select_month
gtk_calendar_select_day
gtk_calendar_mark_day
gtk_calendar_unmark_day
gtk_calendar_get_day_is_marked
gtk_calendar_clear_marks
<SUBSECTION>
@@ -899,7 +898,9 @@ gtk_dialog_response
gtk_dialog_add_button
gtk_dialog_add_buttons
gtk_dialog_add_action_widget
gtk_dialog_get_has_separator
gtk_dialog_set_default_response
gtk_dialog_set_has_separator
gtk_dialog_set_response_sensitive
gtk_dialog_get_response_for_widget
gtk_dialog_get_widget_for_response
@@ -1611,8 +1612,8 @@ gtk_icon_view_get_cursor
gtk_icon_view_selected_foreach
gtk_icon_view_set_selection_mode
gtk_icon_view_get_selection_mode
gtk_icon_view_set_item_orientation
gtk_icon_view_get_item_orientation
gtk_icon_view_set_orientation
gtk_icon_view_get_orientation
gtk_icon_view_set_columns
gtk_icon_view_get_columns
gtk_icon_view_set_item_width
@@ -1832,6 +1833,24 @@ GTK_INVISIBLE_GET_CLASS
gtk_invisible_get_type
</SECTION>
<SECTION>
<FILE>gtkitem</FILE>
<TITLE>GtkItem</TITLE>
GtkItem
gtk_item_select
gtk_item_deselect
gtk_item_toggle
<SUBSECTION Standard>
GTK_ITEM
GTK_IS_ITEM
GTK_TYPE_ITEM
GTK_ITEM_CLASS
GTK_IS_ITEM_CLASS
GTK_ITEM_GET_CLASS
<SUBSECTION Private>
gtk_item_get_type
</SECTION>
<SECTION>
<FILE>gtklabel</FILE>
<TITLE>GtkLabel</TITLE>
@@ -2341,8 +2360,9 @@ gtk_progress_bar_new
gtk_progress_bar_pulse
gtk_progress_bar_set_fraction
gtk_progress_bar_get_fraction
gtk_progress_bar_set_inverted
gtk_progress_bar_get_inverted
GtkProgressBarOrientation
gtk_progress_bar_set_orientation
gtk_progress_bar_get_orientation
gtk_progress_bar_set_show_text
gtk_progress_bar_get_show_text
gtk_progress_bar_set_text
@@ -3050,6 +3070,8 @@ gtk_status_icon_get_title
gtk_status_icon_set_name
gtk_status_icon_set_visible
gtk_status_icon_get_visible
gtk_status_icon_set_blinking
gtk_status_icon_get_blinking
gtk_status_icon_is_embedded
gtk_status_icon_position_menu
gtk_status_icon_get_geometry
@@ -4952,7 +4974,6 @@ GTK_IS_WIDGET_CLASS
GTK_WIDGET_GET_CLASS
GTK_TYPE_REQUISITION
<SUBSECTION Private>
GtkWidgetPrivate
gtk_widget_get_type
gtk_requisition_get_type
</SECTION>
@@ -5072,7 +5093,6 @@ GTK_IS_WINDOW_CLASS
GTK_WINDOW_GET_CLASS
<SUBSECTION Private>
GtkWindowPrivate
gtk_window_get_type
GtkWindowGeometryInfo
gtk_window_remove_embedded_xid
@@ -6340,40 +6360,3 @@ GTK_APPLICATION_GET_CLASS
gtk_application_get_type
GtkApplicationPrivate
</SECTION>
<SECTION>
<FILE>gtkwrapbox</FILE>
<TITLE>GtkWrapBox</TITLE>
GtkWrapBox
gtk_wrap_box_new
gtk_wrap_box_insert_child
gtk_wrap_box_reorder_child
GtkWrapAllocationMode
gtk_wrap_box_set_allocation_mode
gtk_wrap_box_get_allocation_mode
GtkWrapBoxSpreading
gtk_wrap_box_set_spreading
gtk_Wrap_box_get_spreading
gtk_wrap_box_set_vertical_spacing
gtk_wrap_box_get_vertical_spacing
gtk_wrap_box_set_horizontal_spacing
gtk_wrap_box_get_horizontal_spacing
gtk_wrap_box_set_minimum_line_children
gtk_wrap_box_get_minimum_line_children
gtk_wrap_box_set_natural_line_children
gtk_wrap_box_get_natural_line_children
<SUBSECTION Standard>
GtkWrapBoxClass
GTK_TYPE_WRAP_BOX
GTK_WRAP_BOX
GTK_WRAP_BOX_CLASS
GTK_IS_WRAP_BOX
GTK_IS_WRAP_BOX_CLASS
GTK_WRAP_BOX_GET_CLASS
<SUBSECTION Private>
gtk_wrap_box_get_type
GtkWrapBoxPrivate
</SECTION>
+1 -1
View File
@@ -80,6 +80,7 @@ gtk_im_context_simple_get_type
gtk_im_multicontext_get_type
gtk_info_bar_get_type
gtk_invisible_get_type
gtk_item_get_type
gtk_label_get_type
gtk_layout_get_type
gtk_link_button_get_type
@@ -178,4 +179,3 @@ gtk_vseparator_get_type
gtk_widget_get_type
gtk_window_get_type
gtk_window_group_get_type
gtk_wrap_box_get_type
-46
View File
@@ -113,20 +113,6 @@
</para>
</section>
<section>
<title>Replace GDK_&lt;keyname&gt; with GDK_KEY_&lt;keyname&gt;</title>
<para>
Key constants have gained a <literal>_KEY</literal>, prefix.
For example, <literal>GDK_a</literal> is now
<literal>GDK_KEY_a</literal>. In GTK+ 2, the old names continue
to be available. In GTK+ 3 however, the old names will require
an explicit include of the
<literal>gdkkeysyms-compat.h</literal> header.
</para>
</section>
<section>
<title>Use cairo for drawing</title>
<para>
@@ -394,38 +380,6 @@ cairo_destroy (cr);
</para>
</section>
<section>
<title>GtkProgressBar orientation</title>
<para>
In GTK+ 2.x, #GtkProgressBar and #GtkCellRendererProgress were using the
GtkProgressBarOrientation enumeration to specify their orientation and
direction. In GTK+ 3, both the widget and the cell renderer implement
#GtkOrientable, and have an additional 'inverted' property to determine
their direction. Therefore, a call to gtk_progress_bar_set_orientation()
needs to be replaced by a pair of calls to
gtk_orientable_set_orientation() and gtk_progress_bar_set_inverted().
The following values correspond:
<table>
<tgroup cols="3">
<colspec colname="1"/>
<colspec colname="2"/>
<colspec colname="3"/>
<thead>
<row><entry>GTK+ 2.x</entry><entry namest="2" nameend="3">GTK+ 3</entry></row>
<row><entry>GtkProgressBarOrientation</entry><entry>GtkOrientation</entry><entry>inverted</entry></row>
</thead>
<tbody>
<row><entry>GTK_PROGRESS_LEFT_TO_RIGHT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>FALSE</entry></row>
<row><entry>GTK_PROGRESS_RIGHT_TO_LEFT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>TRUE</entry></row>
<row><entry>GTK_PROGRESS_TOP_TO_BOTTOM</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>FALSE</entry></row>
<row><entry>GTK_PROGRESS_BOTTOM_TO_TOP</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>TRUE</entry></row>
</tbody>
</tgroup>
</table>
</para>
</section>
<section>
<title>Prevent mixed linkage</title>
<para>
-5
View File
@@ -7,8 +7,6 @@ gtkcalendar.sgml
gtkcelleditable.sgml
gtkhbox.sgml
gtkiconview.sgml
gtkimcontextsimple.sgml
gtkimmulticontext.sgml
gtkmessagedialog.sgml
gtkobject.sgml
gtkorientable.sgml
@@ -23,7 +21,6 @@ gtkrecentchooserdialog.sgml
gtkrecentchoosermenu.sgml
gtkrecentchooserwidget.sgml
gtkrecentmanager.sgml
gtkscale.sgml
gtkscalebutton.sgml
gtkseparator.sgml
gtkseparatormenuitem.sgml
@@ -32,9 +29,7 @@ gtkstatusbar.sgml
gtkstyle.sgml
gtktesting.sgml
gtktextiter.sgml
gtktexttagtable.sgml
gtktoggleaction.sgml
gtktoolitem.sgml
gtktreednd.sgml
gtktypeutils.sgml
gtkwindow.sgml
+58
View File
@@ -22,6 +22,64 @@ typically use the features described here.
<!-- ##### SECTION Image ##### -->
<!-- ##### VARIABLE gtk_major_version ##### -->
<para>
The major version number of the GTK+ library. (e.g. in GTK+ version
1.2.5 this is 1.)
</para>
<para>
This variable is in the library, so represents the
GTK+ library you have linked against. Contrast with the
#GTK_MAJOR_VERSION macro, which represents the major version of the
GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_minor_version ##### -->
<para>
The minor version number of the GTK+ library.
(e.g. in GTK+ version 1.2.5 this is 2.)
</para>
<para>
This variable is in the library, so represents the
GTK+ library you have linked against. Contrast with the
#GTK_MINOR_VERSION macro, which represents the minor version of the
GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_micro_version ##### -->
<para>
The micro version number of the GTK+ library.
(e.g. in GTK+ version 1.2.5 this is 5.)
</para>
<para>
This variable is in the library, so represents the GTK+ library you
have linked against. Contrast with the #GTK_MICRO_VERSION macro, which
represents the micro version of the GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_binary_age ##### -->
<para>
This is the binary age passed to <application>libtool</application>. If
<application>libtool</application> means nothing to you, don't worry
about it. ;-)
</para>
<!-- ##### VARIABLE gtk_interface_age ##### -->
<para>
This is the interface age passed to <application>libtool</application>. If
<application>libtool</application> means nothing to you, don't worry
about it. ;-)
</para>
<!-- ##### FUNCTION gtk_check_version ##### -->
<para>
</para>
+226
View File
@@ -0,0 +1,226 @@
<!-- ##### SECTION Title ##### -->
GtkFileSelection
<!-- ##### SECTION Short_Description ##### -->
Prompt the user for a file or directory name
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkFileSelection has been superseded by the newer #GtkFileChooser family
of widgets.
</para>
<para>
#GtkFileSelection should be used to retrieve file or directory names from
the user. It will create a new dialog window containing a directory list,
and a file list corresponding to the current working directory. The filesystem
can be navigated using the directory list or the drop-down history menu.
Alternatively, the TAB key can be used to navigate using filename
completion - common in text based editors such as emacs and jed.
</para>
<para>
File selection dialogs are created with a call to gtk_file_selection_new().
</para>
<para>
The default filename can be set using gtk_file_selection_set_filename() and the selected filename retrieved using gtk_file_selection_get_filename().
</para>
<para>
Use gtk_file_selection_complete() to display files and directories
that match a given pattern. This can be used for example, to show only
*.txt files, or only files beginning with gtk*.
</para>
<para>
Simple file operations; create directory, delete file, and rename file, are available from buttons at the top of the dialog. These can be hidden using gtk_file_selection_hide_fileop_buttons() and shown again using gtk_file_selection_show_fileop_buttons().
</para>
<para>
<example>
<title>Getting a filename from the user.</title>
<programlisting>
/* The file selection widget and the string to store the chosen filename */
void store_filename (GtkWidget *widget, gpointer user_data) {
GtkWidget *file_selector = GTK_WIDGET (user_data);
const gchar *selected_filename;
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
g_print ("Selected filename: &percnt;s\n", selected_filename);
}
void create_file_selection (void) {
GtkWidget *file_selector;
/* Create the selector */
file_selector = gtk_file_selection_new ("Please select a file for editing.");
g_signal_connect (GTK_FILE_SELECTION (file_selector)->ok_button,
"clicked",
G_CALLBACK (store_filename),
file_selector);
/* Ensure that the dialog box is destroyed when the user clicks a button. */
g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->ok_button,
"clicked",
G_CALLBACK (gtk_widget_destroy),
file_selector);
g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->cancel_button,
"clicked",
G_CALLBACK (gtk_widget_destroy),
file_selector);
/* Display that dialog */
gtk_widget_show (file_selector);
}
</programlisting>
</example>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkDialog</term>
<listitem><para>Add your own widgets into the #GtkFileSelection.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkFileSelection ##### -->
<para>
The #GtkFileSelection struct contains the following #GtkWidget fields:
</para>
@dir_list:
@file_list:
@selection_entry:
@selection_text:
@main_vbox:
@ok_button:
@cancel_button: the two main buttons that signals should be connected
to in order to perform an action when the user hits either OK or
Cancel.
@help_button:
@history_pulldown: the #GtkOptionMenu used to create the drop-down
directory history.
@history_menu:
@history_list:
@fileop_dialog: the dialog box used to display the #GtkFileSelection.
It can be customized by adding/removing widgets from it using the
standard #GtkDialog functions.
@fileop_entry:
@fileop_file:
@cmpl_state:
@fileop_c_dir:
@fileop_del_file:
@fileop_ren_file: the buttons that appear at the top of the file
selection dialog. These "operation buttons" can be hidden and
redisplayed with gtk_file_selection_hide_fileop_buttons() and
gtk_file_selection_show_fileop_buttons() respectively.
@button_area:
@action_area:
<!-- ##### ARG GtkFileSelection:filename ##### -->
<para>
</para>
<!-- ##### ARG GtkFileSelection:select-multiple ##### -->
<para>
</para>
<!-- ##### ARG GtkFileSelection:show-fileops ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_file_selection_new ##### -->
<para>
Creates a new file selection dialog box. By default it will contain a #GtkTreeView of the application's current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present.
</para>
@title: a message that will be placed in the file requestor's titlebar.
@Returns: the new file selection.
@Deprecated: Use gtk_file_chooser_dialog_new() instead
<!-- ##### FUNCTION gtk_file_selection_set_filename ##### -->
<para>
</para>
@filesel:
@filename:
<!-- ##### FUNCTION gtk_file_selection_get_filename ##### -->
<para>
</para>
@filesel:
@Returns:
<!-- ##### FUNCTION gtk_file_selection_complete ##### -->
<para>
Will attempt to match @pattern to a valid filenames or subdirectories in the current directory. If a match can be made, the matched filename will appear in the text entry field of the file selection dialog.
If a partial match can be made, the "Files" list will contain those
file names which have been partially matched, and the "Folders"
list those directories which have been partially matched.
</para>
@filesel: a #GtkFileSelection.
@pattern: a string of characters which may or may not match any filenames in the current directory.
<!-- ##### FUNCTION gtk_file_selection_show_fileop_buttons ##### -->
<para>
Shows the file operation buttons, if they have previously been hidden. The rest of the widgets in the dialog will be resized accordingly.
</para>
@filesel: a #GtkFileSelection.
<!-- ##### FUNCTION gtk_file_selection_hide_fileop_buttons ##### -->
<para>
Hides the file operation buttons that normally appear at the top of the dialog. Useful if you wish to create a custom file selector, based on #GtkFileSelection.
</para>
@filesel: a #GtkFileSelection.
<!-- ##### FUNCTION gtk_file_selection_get_selections ##### -->
<para>
</para>
@filesel:
@Returns:
<!-- ##### FUNCTION gtk_file_selection_set_select_multiple ##### -->
<para>
</para>
@filesel:
@select_multiple:
<!-- ##### FUNCTION gtk_file_selection_get_select_multiple ##### -->
<para>
</para>
@filesel:
@Returns:
@@ -0,0 +1,55 @@
<!-- ##### SECTION Title ##### -->
GtkIMContextSimple
<!-- ##### SECTION Short_Description ##### -->
An input method context supporting table-based input methods
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkIMContextSimple ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_im_context_simple_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_im_context_simple_add_table ##### -->
<para>
</para>
@context_simple:
@data:
@max_seq_len:
@n_seqs:
<!-- ##### MACRO GTK_MAX_COMPOSE_LEN ##### -->
<para>
The maximum length of sequences in compose tables.
</para>
@@ -0,0 +1,64 @@
<!-- ##### SECTION Title ##### -->
GtkIMMulticontext
<!-- ##### SECTION Short_Description ##### -->
An input method context supporting multiple, loadable input methods
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkIMMulticontext ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_im_multicontext_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_im_multicontext_append_menuitems ##### -->
<para>
</para>
@context:
@menushell:
<!-- ##### FUNCTION gtk_im_multicontext_get_context_id ##### -->
<para>
</para>
@context:
@Returns:
<!-- ##### FUNCTION gtk_im_multicontext_set_context_id ##### -->
<para>
</para>
@context:
@context_id:
+75
View File
@@ -0,0 +1,75 @@
<!-- ##### SECTION Title ##### -->
GtkItem
<!-- ##### SECTION Short_Description ##### -->
Abstract base class for GtkMenuItem, GtkListItem and GtkTreeItem
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkItem widget is an abstract base class for #GtkMenuItem, #GtkListItem
and #GtkTreeItem.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkItem ##### -->
<para>
The #GtkItem-struct struct contains private data only, and
should be accessed using the functions below.
</para>
<!-- ##### SIGNAL GtkItem::deselect ##### -->
<para>
Emitted when the item is deselected.
</para>
@item: the object which received the signal.
<!-- ##### SIGNAL GtkItem::select ##### -->
<para>
Emitted when the item is selected.
</para>
@item: the object which received the signal.
<!-- ##### SIGNAL GtkItem::toggle ##### -->
<para>
Emitted when the item is toggled.
</para>
@item: the object which received the signal.
<!-- ##### FUNCTION gtk_item_select ##### -->
<para>
Emits the "select" signal on the given item.
</para>
@item: a #GtkItem.
<!-- ##### FUNCTION gtk_item_deselect ##### -->
<para>
Emits the "deselect" signal on the given item.
</para>
@item: a #GtkItem.
<!-- ##### FUNCTION gtk_item_toggle ##### -->
<para>
Emits the "toggle" signal on the given item.
</para>
@item: a #GtkItem.
+193
View File
@@ -0,0 +1,193 @@
<!-- ##### SECTION Title ##### -->
GtkScale
<!-- ##### SECTION Short_Description ##### -->
Base class for GtkHScale and GtkVScale
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkScale is a slider control used to select a numeric value.
To use it, you'll probably want to investigate the methods on
its base class, #GtkRange, in addition to the methods for #GtkScale itself.
To set the value of a scale, you would normally use gtk_range_set_value().
To detect changes to the value, you would normally use the "value_changed"
signal.
</para>
<refsect2 id="GtkScale-BUILDER-UI"><title>GtkScale as GtkBuildable</title>
<para>
GtkScale supports a custom &lt;marks&gt; element, which
can contain multiple &lt;mark&gt; elements. The "value" and "position"
attributes have the same meaning as gtk_scale_add_mark() parameters of the
same name. If the element is not empty, its content is taken as the markup
to show at the mark. It can be translated with the usual "translatable and
"context" attributes.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkScale ##### -->
<para>
The fields of the #GtkScale-struct struct should only be accessed via
the accessor functions.
</para>
<!-- ##### SIGNAL GtkScale::format-value ##### -->
<para>
</para>
@scale:
@value:
@Returns:
<!-- ##### ARG GtkScale:digits ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:draw-value ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:value-pos ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:slider-length ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:value-spacing ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_scale_new ##### -->
<para>
</para>
@orientation:
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_scale_new_with_range ##### -->
<para>
</para>
@orientation:
@min:
@max:
@step:
@Returns:
<!-- ##### FUNCTION gtk_scale_set_digits ##### -->
<para>
</para>
@scale:
@digits:
<!-- ##### FUNCTION gtk_scale_set_draw_value ##### -->
<para>
</para>
@scale:
@draw_value:
<!-- ##### FUNCTION gtk_scale_set_value_pos ##### -->
<para>
</para>
@scale:
@pos:
<!-- ##### FUNCTION gtk_scale_get_digits ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_draw_value ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_value_pos ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_layout ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_layout_offsets ##### -->
<para>
</para>
@scale:
@x:
@y:
<!-- ##### FUNCTION gtk_scale_add_mark ##### -->
<para>
</para>
@scale:
@value:
@position:
@markup:
<!-- ##### FUNCTION gtk_scale_clear_marks ##### -->
<para>
</para>
@scale:
@@ -0,0 +1,125 @@
<!-- ##### SECTION Title ##### -->
GtkTextTagTable
<!-- ##### SECTION Short_Description ##### -->
Collection of tags that can be used together
<!-- ##### SECTION Long_Description ##### -->
<para>
You may wish to begin by reading the <link linkend="TextWidget">text widget
conceptual overview</link> which gives an overview of all the objects and data
types related to the text widget and how they work together.
</para>
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkTextTagTable ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkTextTagTable::tag-added ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTextTagTable::tag-changed ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkTextTagTable::tag-removed ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
<!-- ##### USER_FUNCTION GtkTextTagTableForeach ##### -->
<para>
</para>
@tag:
@data:
<!-- ##### FUNCTION gtk_text_tag_table_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_text_tag_table_add ##### -->
<para>
</para>
@table:
@tag:
<!-- ##### FUNCTION gtk_text_tag_table_remove ##### -->
<para>
</para>
@table:
@tag:
<!-- ##### FUNCTION gtk_text_tag_table_lookup ##### -->
<para>
</para>
@table:
@name:
@Returns:
<!-- ##### FUNCTION gtk_text_tag_table_foreach ##### -->
<para>
</para>
@table:
@func:
@data:
<!-- ##### FUNCTION gtk_text_tag_table_get_size ##### -->
<para>
</para>
@table:
@Returns:
+51
View File
@@ -0,0 +1,51 @@
<!-- ##### SECTION Title ##### -->
Types
<!-- ##### SECTION Short_Description ##### -->
Handle run-time type creation
<!-- ##### SECTION Long_Description ##### -->
<para>
The GTK+ type system is extensible. Because of that, types have to be
managed at runtime.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### USER_FUNCTION GtkFunction ##### -->
<para>
Defines a function pointer.
</para>
@data: #gpointer
@Returns: #gint
<!-- ##### USER_FUNCTION GtkCallbackMarshal ##### -->
<para>
Defines a function pointer.
</para>
@object: #GtkObject*
@data: #gpointer
@n_args: #guint
@args: #GtkArg*
<!-- ##### STRUCT GtkArg ##### -->
<para>
This is a structure that we use to pass in typed values (and names).
</para>
@type:
@name:
+3 -3
View File
@@ -33,7 +33,7 @@ find_toplevel_window (Window xid)
do
{
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
if (XQueryTree (GDK_DISPLAY (), xid, &root,
&parent, &children, &nchildren) == 0)
{
g_warning ("Couldn't find window manager window");
@@ -82,7 +82,7 @@ remove_shaped_area (GdkPixbuf *pixbuf,
gdk_pixbuf_get_height (pixbuf));
gdk_pixbuf_fill (retval, 0);
rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window,
rectangles = XShapeGetRectangles (GDK_DISPLAY (), window,
ShapeBounding, &rectangle_count, &rectangle_order);
for (i = 0; i < rectangle_count; i++)
@@ -130,7 +130,7 @@ take_window_shot (Window child,
GdkPixbuf *tmp, *tmp2;
GdkPixbuf *retval;
disp = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
disp = GDK_DISPLAY ();
w = GDK_ROOT_WINDOW ();
if (include_decoration)
+2 -2
View File
@@ -21,7 +21,7 @@ find_toplevel_window (Window xid)
do
{
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
if (XQueryTree (GDK_DISPLAY (), xid, &root,
&parent, &children, &nchildren) == 0)
{
g_warning ("Couldn't find window manager window");
@@ -270,7 +270,7 @@ create_accel_label (void)
info = new_widget_info ("accel-label", box, SMALL);
gtk_widget_add_accelerator (button, "activate", accel_group, GDK_KEY_Q, GDK_CONTROL_MASK,
gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Q, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
return info;
+20 -12
View File
@@ -1910,7 +1910,7 @@ given item, and perform the cast. Some common ones you will see are:</para>
G_OBJECT (object)
GTK_WIDGET (widget)
GTK_OBJECT (object)
G_CALLBACK (function)
GTK_SIGNAL_FUNC (function)
GTK_CONTAINER (container)
GTK_WINDOW (window)
GTK_BOX (box)
@@ -5369,8 +5369,8 @@ widget.</para>
the widget both looks and operates by using the function</para>
<programlisting role="C">
void gtk_calendar_set_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
void gtk_calendar_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
</programlisting>
<para>The <literal>flags</literal> argument can be formed by combining either of the
@@ -5405,6 +5405,14 @@ number for each week should be displayed down the left side of the
calendar. (eg. Jan 1 = Week 1,Dec 31 = Week 52).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>GTK_CALENDAR_WEEK_START_MONDAY</literal></term>
<listitem><para>this option states that the
calander week will start on Monday instead of Sunday which is the
default. This only affects the order in which days are displayed from
left to right.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The following functions are used to set the the currently displayed
@@ -5670,7 +5678,7 @@ static void calendar_set_flags( CalendarData *calendar )
options = options + (1 &lt;&lt; i);
}
if (calendar-&gt;window)
gtk_calendar_set_display_options (GTK_CALENDAR (calendar-&gt;window), options);
gtk_calendar_display_options (GTK_CALENDAR (calendar-&gt;window), options);
}
static void calendar_toggle_flag( GtkWidget *toggle,
@@ -6145,7 +6153,7 @@ gint main( gint argc,
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
g_signal_connect (GTK_OBJECT (drawingarea), "event",
G_CALLBACK (area_event), (gpointer) drawingarea);
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
@@ -7642,7 +7650,7 @@ the toolbar widget.</para>
"Closes this app", /* this button's tooltip */
"Private", /* tooltip private info */
iconw, /* icon widget */
G_CALLBACK (delete_event), /* a signal */
GTK_SIGNAL_FUNC (delete_event), /* a signal */
NULL);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
</programlisting>
@@ -7666,7 +7674,7 @@ widget, so that we can work with it in the normal way.</para>
"Only icons in toolbar", /* tooltip */
"Private", /* tooltip private string */
iconw, /* icon */
G_CALLBACK (radio_event), /* signal */
GTK_SIGNAL_FUNC (radio_event), /* signal */
toolbar); /* data for signal */
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
</programlisting>
@@ -7692,7 +7700,7 @@ tutorial).</para>
"Only texts in toolbar",
"Private",
iconw,
G_CALLBACK (radio_event),
GTK_SIGNAL_FUNC (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
@@ -7705,7 +7713,7 @@ tutorial).</para>
"Icons and text in toolbar",
"Private",
iconw,
G_CALLBACK (radio_event),
GTK_SIGNAL_FUNC (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
@@ -7726,7 +7734,7 @@ between them).</para>
"Toolbar with or without tips",
"Private",
iconw,
G_CALLBACK (toggle_event),
GTK_SIGNAL_FUNC (toggle_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tooltips_button), TRUE);
@@ -15065,10 +15073,10 @@ gtk_dial_set_adjustment (GtkDial *dial,
g_object_ref (GTK_OBJECT (dial-&gt;adjustment));
g_signal_connect (GTK_OBJECT (adjustment), "changed",
G_CALLBACK (gtk_dial_adjustment_changed),
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
(gpointer) dial);
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
G_CALLBACK (gtk_dial_adjustment_value_changed),
GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
(gpointer) dial);
dial-&gt;old_value = adjustment-&gt;value;
+1 -1
View File
@@ -160,7 +160,7 @@ static void calendar_set_flags( CalendarData *calendar )
options = options + (1 << i);
}
if (calendar->window)
gtk_calendar_set_display_options (GTK_CALENDAR (calendar->window), options);
gtk_calendar_display_options (GTK_CALENDAR (calendar->window), options);
}
static void calendar_toggle_flag( GtkWidget *toggle,
+2 -2
View File
@@ -97,7 +97,7 @@ gint main( gint argc,
/* Attach to the "delete" and "destroy" events so we can exit */
g_signal_connect (GTK_OBJECT (window), "delete_event",
G_CALLBACK (destroy_window), (gpointer) window);
GTK_SIGNAL_FUNC (destroy_window), (gpointer) window);
/* Create drawingarea, set size and catch button events */
@@ -113,7 +113,7 @@ gint main( gint argc,
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
g_signal_connect (GTK_OBJECT (drawingarea), "event",
G_CALLBACK (area_event), (gpointer) drawingarea);
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
+3 -4
View File
@@ -84,7 +84,6 @@ gdk_public_h_sources = \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
gdkkeysyms-compat.h \
gdkpango.h \
gdkpixbuf.h \
gdkpixmap.h \
@@ -172,13 +171,13 @@ libgdk_win32_3_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(src
if HAVE_INTROSPECTION
introspection_files = \
$(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
$(gdk_public_h_sources) \
$(gdk_c_sources) \
gdkenumtypes.c \
gdkenumtypes.h
Gdk-3.0.gir: $(gdktargetlib) Makefile
Gdk_3_0_gir_SCANNERFLAGS = --warn-all
Gdk_3_0_gir_SCANNERFLAGS = --strip-prefix=Gdk
Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
Gdk_3_0_gir_LIBS = $(gdktargetlib)
Gdk_3_0_gir_FILES = $(introspection_files)
@@ -226,7 +225,7 @@ x11_introspection_files = \
x11/gdkx.h
GdkX11-3.0.gir: $(gdktargetlib) Gdk-3.0.gir Makefile
GdkX11_3_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Gdk --symbol-prefix=gdk
GdkX11_3_0_gir_SCANNERFLAGS = --strip-prefix=gdk_x11
GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
GdkX11_3_0_gir_LIBS = $(gdktargetlib)
GdkX11_3_0_gir_FILES = $(x11_introspection_files)
+4 -9
View File
@@ -63,11 +63,6 @@ static int gdk_initialized = 0; /* 1 if the library is initialized,
static gchar *gdk_progclass = NULL;
static GMutex *gdk_threads_mutex = NULL; /* Global GDK lock */
static GCallback gdk_threads_lock = NULL;
static GCallback gdk_threads_unlock = NULL;
#ifdef G_ENABLE_DEBUG
static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
@@ -76,7 +71,9 @@ static const GDebugKey gdk_debug_keys[] = {
{"xim", GDK_DEBUG_XIM},
{"nograbs", GDK_DEBUG_NOGRABS},
{"colormap", GDK_DEBUG_COLORMAP},
{"gc", GDK_DEBUG_GC},
{"pixmap", GDK_DEBUG_PIXMAP},
{"image", GDK_DEBUG_IMAGE},
{"input", GDK_DEBUG_INPUT},
{"cursor", GDK_DEBUG_CURSOR},
{"multihead", GDK_DEBUG_MULTIHEAD},
@@ -387,15 +384,13 @@ gdk_init (int *argc, char ***argv)
void
gdk_threads_enter (void)
{
if (gdk_threads_lock)
(*gdk_threads_lock) ();
GDK_THREADS_ENTER ();
}
void
gdk_threads_leave (void)
{
if (gdk_threads_unlock)
(*gdk_threads_unlock) ();
GDK_THREADS_LEAVE ();
}
static void
+20 -3
View File
@@ -43,7 +43,6 @@
#include <gdk/gdkevents.h>
#include <gdk/gdkinput.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkpango.h>
#include <gdk/gdkpixbuf.h>
#include <gdk/gdkpixmap.h>
@@ -152,6 +151,13 @@ void gdk_notify_startup_complete_with_id (const gchar* startup_id);
/* Threading
*/
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
GDKVAR GMutex *gdk_threads_mutex; /* private */
#endif
GDKVAR GCallback gdk_threads_lock;
GDKVAR GCallback gdk_threads_unlock;
void gdk_threads_enter (void);
void gdk_threads_leave (void);
void gdk_threads_init (void);
@@ -181,8 +187,19 @@ guint gdk_threads_add_timeout_seconds (guint interval,
GSourceFunc function,
gpointer data);
#define GDK_THREADS_ENTER() gdk_threads_enter()
#define GDK_THREADS_LEAVE() gdk_threads_leave()
#ifdef G_THREADS_ENABLED
# define GDK_THREADS_ENTER() G_STMT_START { \
if (gdk_threads_lock) \
(*gdk_threads_lock) (); \
} G_STMT_END
# define GDK_THREADS_LEAVE() G_STMT_START { \
if (gdk_threads_unlock) \
(*gdk_threads_unlock) (); \
} G_STMT_END
#else /* !G_THREADS_ENABLED */
# define GDK_THREADS_ENTER()
# define GDK_THREADS_LEAVE()
#endif /* !G_THREADS_ENABLED */
G_END_DECLS
+13
View File
@@ -587,6 +587,7 @@ gdk_window_get_geometry
gdk_window_get_modal_hint
gdk_window_get_origin
gdk_window_get_root_coords
gdk_window_get_deskrelative_origin
gdk_window_set_support_multidevice
gdk_window_get_support_multidevice
gdk_window_has_native
@@ -1091,3 +1092,15 @@ gdk_app_launch_context_set_icon_name
gdk_window_impl_get_type G_GNUC_CONST
#endif
#endif
#ifdef INCLUDE_VARIABLES
gdk_threads_mutex
gdk_threads_lock
gdk_threads_unlock
#endif
#ifdef GDK_WINDOWING_X11
#ifdef INCLUDE_VARIABLES
gdk_display
#endif
#endif
+5 -5
View File
@@ -95,7 +95,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_DISPLAY,
g_param_spec_object ("display",
P_("Device Display"),
P_("Display which the device belongs to"),
P_("Display to which the device belongs to"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
@@ -110,7 +110,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_DEVICE_MANAGER,
g_param_spec_object ("device-manager",
P_("Device manager"),
P_("Device manager which the device belongs to"),
P_("Device manager to which the device belongs to"),
GDK_TYPE_DEVICE_MANAGER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
@@ -148,7 +148,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
/**
* GdkDevice:associated-device:
*
* Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
* Associated pointer or keyboard to this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
* always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
*
* Since: 3.0
@@ -157,7 +157,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_ASSOCIATED_DEVICE,
g_param_spec_object ("associated-device",
P_("Associated device"),
P_("Associated pointer or keyboard with this device"),
P_("Associated pointer or keyboard to this device"),
GDK_TYPE_DEVICE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
@@ -202,7 +202,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
g_object_class_install_property (object_class,
PROP_HAS_CURSOR,
g_param_spec_boolean ("has-cursor",
P_("Whether the device has a cursor"),
P_("Whether the device has cursor"),
P_("Whether there is a visible cursor following device motion"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+1
View File
@@ -1445,6 +1445,7 @@ gdk_synthesize_window_state (GdkWindow *window,
switch (((GdkWindowObject*) window)->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP: /* ? */
gdk_display_put_event (gdk_drawable_get_display (window), &temp_event);
break;
+4
View File
@@ -43,3 +43,7 @@ gboolean _gdk_native_windows = FALSE;
gboolean _gdk_enable_multidevice = FALSE;
GSList *_gdk_displays = NULL;
GMutex *gdk_threads_mutex = NULL; /* Global GDK lock */
GCallback gdk_threads_lock = NULL;
GCallback gdk_threads_unlock = NULL;
+9 -7
View File
@@ -77,13 +77,15 @@ typedef enum {
GDK_DEBUG_XIM = 1 << 3,
GDK_DEBUG_NOGRABS = 1 << 4,
GDK_DEBUG_COLORMAP = 1 << 5,
GDK_DEBUG_PIXMAP = 1 << 6,
GDK_DEBUG_INPUT = 1 << 7,
GDK_DEBUG_CURSOR = 1 << 8,
GDK_DEBUG_MULTIHEAD = 1 << 9,
GDK_DEBUG_XINERAMA = 1 <<10,
GDK_DEBUG_DRAW = 1 <<11,
GDK_DEBUG_EVENTLOOP = 1 <<12
GDK_DEBUG_GC = 1 << 6,
GDK_DEBUG_PIXMAP = 1 << 7,
GDK_DEBUG_IMAGE = 1 << 8,
GDK_DEBUG_INPUT = 1 << 9,
GDK_DEBUG_CURSOR = 1 <<10,
GDK_DEBUG_MULTIHEAD = 1 <<11,
GDK_DEBUG_XINERAMA = 1 <<12,
GDK_DEBUG_DRAW = 1 <<13,
GDK_DEBUG_EVENTLOOP = 1 <<14
} GdkDebugFlag;
extern GList *_gdk_default_filters;
+1 -1
View File
@@ -98,5 +98,5 @@ gdk_keyval_from_name (const gchar *keyval_name)
if (found != NULL)
return found->keyval;
else
return GDK_KEY_VoidSymbol;
return GDK_VoidSymbol;
}
+76 -76
View File
@@ -125,7 +125,7 @@ gdk_keymap_init (GdkKeymap *keymap)
* @upper: (out): return location for uppercase version of @symbol
*
* Obtains the upper- and lower-case versions of the keyval @symbol.
* Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc.
* Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc.
*
**/
void
@@ -149,101 +149,101 @@ gdk_keyval_convert_case (guint symbol,
switch (symbol >> 8)
{
case 0: /* Latin 1 */
if ((symbol >= GDK_KEY_A) && (symbol <= GDK_KEY_Z))
xlower += (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_a) && (symbol <= GDK_KEY_z))
xupper -= (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_Agrave) && (symbol <= GDK_KEY_Odiaeresis))
xlower += (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_agrave) && (symbol <= GDK_KEY_odiaeresis))
xupper -= (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_Ooblique) && (symbol <= GDK_KEY_Thorn))
xlower += (GDK_KEY_oslash - GDK_KEY_Ooblique);
else if ((symbol >= GDK_KEY_oslash) && (symbol <= GDK_KEY_thorn))
xupper -= (GDK_KEY_oslash - GDK_KEY_Ooblique);
if ((symbol >= GDK_A) && (symbol <= GDK_Z))
xlower += (GDK_a - GDK_A);
else if ((symbol >= GDK_a) && (symbol <= GDK_z))
xupper -= (GDK_a - GDK_A);
else if ((symbol >= GDK_Agrave) && (symbol <= GDK_Odiaeresis))
xlower += (GDK_agrave - GDK_Agrave);
else if ((symbol >= GDK_agrave) && (symbol <= GDK_odiaeresis))
xupper -= (GDK_agrave - GDK_Agrave);
else if ((symbol >= GDK_Ooblique) && (symbol <= GDK_Thorn))
xlower += (GDK_oslash - GDK_Ooblique);
else if ((symbol >= GDK_oslash) && (symbol <= GDK_thorn))
xupper -= (GDK_oslash - GDK_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_KEY_Aogonek)
xlower = GDK_KEY_aogonek;
else if (symbol >= GDK_KEY_Lstroke && symbol <= GDK_KEY_Sacute)
xlower += (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_Scaron && symbol <= GDK_KEY_Zacute)
xlower += (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_Zcaron && symbol <= GDK_KEY_Zabovedot)
xlower += (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol == GDK_KEY_aogonek)
xupper = GDK_KEY_Aogonek;
else if (symbol >= GDK_KEY_lstroke && symbol <= GDK_KEY_sacute)
xupper -= (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_scaron && symbol <= GDK_KEY_zacute)
xupper -= (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_zcaron && symbol <= GDK_KEY_zabovedot)
xupper -= (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol >= GDK_KEY_Racute && symbol <= GDK_KEY_Tcedilla)
xlower += (GDK_KEY_racute - GDK_KEY_Racute);
else if (symbol >= GDK_KEY_racute && symbol <= GDK_KEY_tcedilla)
xupper -= (GDK_KEY_racute - GDK_KEY_Racute);
if (symbol == GDK_Aogonek)
xlower = GDK_aogonek;
else if (symbol >= GDK_Lstroke && symbol <= GDK_Sacute)
xlower += (GDK_lstroke - GDK_Lstroke);
else if (symbol >= GDK_Scaron && symbol <= GDK_Zacute)
xlower += (GDK_scaron - GDK_Scaron);
else if (symbol >= GDK_Zcaron && symbol <= GDK_Zabovedot)
xlower += (GDK_zcaron - GDK_Zcaron);
else if (symbol == GDK_aogonek)
xupper = GDK_Aogonek;
else if (symbol >= GDK_lstroke && symbol <= GDK_sacute)
xupper -= (GDK_lstroke - GDK_Lstroke);
else if (symbol >= GDK_scaron && symbol <= GDK_zacute)
xupper -= (GDK_scaron - GDK_Scaron);
else if (symbol >= GDK_zcaron && symbol <= GDK_zabovedot)
xupper -= (GDK_zcaron - GDK_Zcaron);
else if (symbol >= GDK_Racute && symbol <= GDK_Tcedilla)
xlower += (GDK_racute - GDK_Racute);
else if (symbol >= GDK_racute && symbol <= GDK_tcedilla)
xupper -= (GDK_racute - GDK_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Hstroke && symbol <= GDK_KEY_Hcircumflex)
xlower += (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_Gbreve && symbol <= GDK_KEY_Jcircumflex)
xlower += (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_hstroke && symbol <= GDK_KEY_hcircumflex)
xupper -= (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_gbreve && symbol <= GDK_KEY_jcircumflex)
xupper -= (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_Cabovedot && symbol <= GDK_KEY_Scircumflex)
xlower += (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
else if (symbol >= GDK_KEY_cabovedot && symbol <= GDK_KEY_scircumflex)
xupper -= (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
if (symbol >= GDK_Hstroke && symbol <= GDK_Hcircumflex)
xlower += (GDK_hstroke - GDK_Hstroke);
else if (symbol >= GDK_Gbreve && symbol <= GDK_Jcircumflex)
xlower += (GDK_gbreve - GDK_Gbreve);
else if (symbol >= GDK_hstroke && symbol <= GDK_hcircumflex)
xupper -= (GDK_hstroke - GDK_Hstroke);
else if (symbol >= GDK_gbreve && symbol <= GDK_jcircumflex)
xupper -= (GDK_gbreve - GDK_Gbreve);
else if (symbol >= GDK_Cabovedot && symbol <= GDK_Scircumflex)
xlower += (GDK_cabovedot - GDK_Cabovedot);
else if (symbol >= GDK_cabovedot && symbol <= GDK_scircumflex)
xupper -= (GDK_cabovedot - GDK_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Rcedilla && symbol <= GDK_KEY_Tslash)
xlower += (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol >= GDK_KEY_rcedilla && symbol <= GDK_KEY_tslash)
xupper -= (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol == GDK_KEY_ENG)
xlower = GDK_KEY_eng;
else if (symbol == GDK_KEY_eng)
xupper = GDK_KEY_ENG;
else if (symbol >= GDK_KEY_Amacron && symbol <= GDK_KEY_Umacron)
xlower += (GDK_KEY_amacron - GDK_KEY_Amacron);
else if (symbol >= GDK_KEY_amacron && symbol <= GDK_KEY_umacron)
xupper -= (GDK_KEY_amacron - GDK_KEY_Amacron);
if (symbol >= GDK_Rcedilla && symbol <= GDK_Tslash)
xlower += (GDK_rcedilla - GDK_Rcedilla);
else if (symbol >= GDK_rcedilla && symbol <= GDK_tslash)
xupper -= (GDK_rcedilla - GDK_Rcedilla);
else if (symbol == GDK_ENG)
xlower = GDK_eng;
else if (symbol == GDK_eng)
xupper = GDK_ENG;
else if (symbol >= GDK_Amacron && symbol <= GDK_Umacron)
xlower += (GDK_amacron - GDK_Amacron);
else if (symbol >= GDK_amacron && symbol <= GDK_umacron)
xupper -= (GDK_amacron - GDK_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Serbian_DJE && symbol <= GDK_KEY_Serbian_DZE)
xlower -= (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Serbian_dje && symbol <= GDK_KEY_Serbian_dze)
xupper += (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Cyrillic_YU && symbol <= GDK_KEY_Cyrillic_HARDSIGN)
xlower -= (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
else if (symbol >= GDK_KEY_Cyrillic_yu && symbol <= GDK_KEY_Cyrillic_hardsign)
xupper += (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
if (symbol >= GDK_Serbian_DJE && symbol <= GDK_Serbian_DZE)
xlower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (symbol >= GDK_Serbian_dje && symbol <= GDK_Serbian_dze)
xupper += (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (symbol >= GDK_Cyrillic_YU && symbol <= GDK_Cyrillic_HARDSIGN)
xlower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
else if (symbol >= GDK_Cyrillic_yu && symbol <= GDK_Cyrillic_hardsign)
xupper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Greek_ALPHAaccent && symbol <= GDK_KEY_Greek_OMEGAaccent)
xlower += (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_alphaaccent && symbol <= GDK_KEY_Greek_omegaaccent &&
symbol != GDK_KEY_Greek_iotaaccentdieresis &&
symbol != GDK_KEY_Greek_upsilonaccentdieresis)
xupper -= (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_ALPHA && symbol <= GDK_KEY_Greek_OMEGA)
xlower += (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
else if (symbol >= GDK_KEY_Greek_alpha && symbol <= GDK_KEY_Greek_omega &&
symbol != GDK_KEY_Greek_finalsmallsigma)
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
if (symbol >= GDK_Greek_ALPHAaccent && symbol <= GDK_Greek_OMEGAaccent)
xlower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (symbol >= GDK_Greek_alphaaccent && symbol <= GDK_Greek_omegaaccent &&
symbol != GDK_Greek_iotaaccentdieresis &&
symbol != GDK_Greek_upsilonaccentdieresis)
xupper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (symbol >= GDK_Greek_ALPHA && symbol <= GDK_Greek_OMEGA)
xlower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
else if (symbol >= GDK_Greek_alpha && symbol <= GDK_Greek_omega &&
symbol != GDK_Greek_finalsmallsigma)
xupper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
break;
}
File diff suppressed because it is too large Load Diff
+6 -44
View File
@@ -63,10 +63,7 @@ die "Could not open file keysymdef.h: $!\n" unless open(IN_KEYSYMDEF, "<:utf8",
# Output: gtk+/gdk/gdkkeysyms.h
die "Could not open file gdkkeysyms.h: $!\n" unless open(OUT_GDKKEYSYMS, ">:utf8", "gdkkeysyms.h");
# Output: gtk+/gdk/gdkkeysyms-compat.h
die "Could not open file gdkkeysyms-compat.h: $!\n" unless open(OUT_GDKKEYSYMS_COMPAT, ">:utf8", "gdkkeysyms-compat.h");
my $LICENSE_HEADER= <<EOF;
print OUT_GDKKEYSYMS<<EOF;
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 2005, 2006, 2007, 2009 GNOME Foundation
@@ -87,13 +84,6 @@ my $LICENSE_HEADER= <<EOF;
* Boston, MA 02111-1307, USA.
*/
EOF
print OUT_GDKKEYSYMS $LICENSE_HEADER;
print OUT_GDKKEYSYMS_COMPAT $LICENSE_HEADER;
print OUT_GDKKEYSYMS<<EOF;
/*
* File auto-generated from script http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms-update.pl
* using the input file
@@ -115,19 +105,6 @@ print OUT_GDKKEYSYMS<<EOF;
EOF
print OUT_GDKKEYSYMS_COMPAT<<EOF;
/*
* Compatibility version of gdkkeysyms.h.
*
* In GTK3, keysyms changed to have a KEY_ prefix. This is a compatibility header
* your application can include to gain access to the old names as well. Consider
* porting to the new names instead.
*/
#ifndef __GDK_KEYSYMS_COMPAT_H__
#define __GDK_KEYSYMS_COMPAT_H__
EOF
while (<IN_KEYSYMDEF>)
{
@@ -142,14 +119,9 @@ while (<IN_KEYSYMDEF>)
$_ = $keysymelements[2];
die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ );
my $element = $keysymelements[1];
my $binding = $element;
$binding =~ s/^XK_/GDK_KEY_/g;
my $compat_binding = $element;
$compat_binding =~ s/^XK_/GDK_/g;
$keysymelements[1] =~ s/^XK_/GDK_/g;
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
printf OUT_GDKKEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]);
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
}
close IN_KEYSYMDEF;
@@ -190,14 +162,9 @@ while (<IN_XF86KEYSYM>)
$_ = $keysymelements[2];
die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ );
my $element = $keysymelements[1];
my $binding = $element;
$binding =~ s/^XF86XK_/GDK_KEY_/g;
my $compat_binding = $element;
$compat_binding =~ s/^XF86XK_/GDK_/g;
$keysymelements[1] =~ s/^XF86XK_/GDK_/g;
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
printf OUT_GDKKEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]);
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
}
close IN_XF86KEYSYM;
@@ -208,9 +175,4 @@ print OUT_GDKKEYSYMS<<EOF;
#endif /* __GDK_KEYSYMS_H__ */
EOF
print OUT_GDKKEYSYMS_COMPAT<<EOF;
#endif /* __GDK_KEYSYMS_COMPAT_H__ */
EOF
printf "We just finished converting keysymdef.h to gdkkeysyms.h and gdkkeysyms-compat.h\nThank you\n";
printf "We just finished converting keysymdef.h to gdkkeysyms.h\nThank you\n";
+2174 -2176
View File
File diff suppressed because it is too large Load Diff
+36
View File
@@ -368,6 +368,41 @@ gdk_offscreen_window_get_root_coords (GdkWindow *window,
return TRUE;
}
static gint
gdk_offscreen_window_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y)
{
GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
GdkOffscreenWindow *offscreen;
int tmpx, tmpy;
tmpx = 0;
tmpy = 0;
offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
if (offscreen->embedder)
{
double dx, dy;
gdk_window_get_deskrelative_origin (offscreen->embedder,
&tmpx, &tmpy);
to_embedder (window,
0, 0,
&dx, &dy);
tmpx = floor (tmpx + dx + 0.5);
tmpy = floor (tmpy + dy + 0.5);
}
if (x)
*x = tmpx;
if (y)
*y = tmpy;
return TRUE;
}
static gboolean
gdk_offscreen_window_get_device_state (GdkWindow *window,
GdkDevice *device,
@@ -841,6 +876,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
iface->translate = gdk_offscreen_window_translate;
iface->get_root_coords = gdk_offscreen_window_get_root_coords;
iface->get_deskrelative_origin = gdk_offscreen_window_get_deskrelative_origin;
iface->get_device_state = gdk_offscreen_window_get_device_state;
iface->destroy = gdk_offscreen_window_destroy;
}
+10
View File
@@ -38,6 +38,16 @@
#include <glib-object.h>
#include <cairo.h>
#ifdef G_OS_WIN32
# ifdef GDK_COMPILATION
# define GDKVAR __declspec(dllexport)
# else
# define GDKVAR extern __declspec(dllimport)
# endif
#else
# define GDKVAR extern
#endif
/* The system specific file gdkconfig.h contains such configuration
* settings that are needed not only when compiling GDK (or GTK)
* itself, but also occasionally when compiling programs that use GDK
+55 -8
View File
@@ -1381,6 +1381,7 @@ gdk_window_new (GdkWindow *parent,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
case GDK_WINDOW_OFFSCREEN:
if (GDK_WINDOW_TYPE (parent) != GDK_WINDOW_ROOT)
@@ -1682,6 +1683,7 @@ gdk_window_reparent (GdkWindow *window,
case GDK_WINDOW_OFFSCREEN:
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_CHILD:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
@@ -2016,6 +2018,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
/* else fall thru */
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_CHILD:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
case GDK_WINDOW_FOREIGN:
case GDK_WINDOW_OFFSCREEN:
@@ -5442,15 +5445,15 @@ gdk_window_get_pointer (GdkWindow *window,
* gdk_window_get_device_position:
* @window: a #GdkWindow.
* @device: #GdkDevice to query to.
* @x: (out) (allow-none): return location for the X coordinate of @device, or %NULL.
* @y: (out) (allow-none): return location for the Y coordinate of @device, or %NULL.
* @mask: (out) (allow-none): return location for the modifier mask, or %NULL.
* @x: return location for the X coordinate of @device, or %NULL.
* @y: return location for the Y coordinate of @device, or %NULL.
* @mask: return location for the modifier mask, or %NULL.
*
* Obtains the current device position and modifier state.
* The position is given in coordinates relative to the upper left
* corner of @window.
*
* Return value: (transfer none): The window underneath @device (as with
* Returns: The window underneath @device (as with
* gdk_display_get_window_at_device_position()), or %NULL if the
* window is not known to GDK.
*
@@ -7673,6 +7676,50 @@ gdk_window_coords_from_parent (GdkWindow *window,
}
}
/**
* gdk_window_get_deskrelative_origin:
* @window: a toplevel #GdkWindow
* @x: return location for X coordinate
* @y: return location for Y coordinate
*
* This gets the origin of a #GdkWindow relative to
* an Enlightenment-window-manager desktop. As long as you don't
* assume that the user's desktop/workspace covers the entire
* root window (i.e. you don't assume that the desktop begins
* at root window coordinate 0,0) this function is not necessary.
* It's deprecated for that reason.
*
* Return value: not meaningful
**/
gboolean
gdk_window_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y)
{
GdkWindowObject *private;
GdkWindowImplIface *impl_iface;
gboolean return_val = FALSE;
gint tx = 0;
gint ty = 0;
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
private = (GdkWindowObject *) window;
if (!GDK_WINDOW_DESTROYED (window))
{
impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
return_val = impl_iface->get_deskrelative_origin (window, &tx, &ty);
if (x)
*x = tx + private->abs_x;
if (y)
*y = ty + private->abs_y;
}
return return_val;
}
/**
* gdk_window_shape_combine_mask:
* @window: a #GdkWindow
@@ -9822,10 +9869,10 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
{
toplevel_priv->synthesize_crossing_event_queued = TRUE;
gdk_threads_add_idle_full (GDK_PRIORITY_EVENTS - 1,
do_synthesize_crossing_event,
g_object_ref (toplevel),
g_object_unref);
g_idle_add_full (GDK_PRIORITY_EVENTS - 1,
do_synthesize_crossing_event,
g_object_ref (toplevel),
g_object_unref);
}
}
+9
View File
@@ -65,6 +65,7 @@ typedef enum
* screen, and is created by the window system
* @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow)
* @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry)
* @GDK_WINDOW_DIALOG: useless/deprecated compatibility type
* @GDK_WINDOW_TEMP: override redirect temporary window (used to implement
* #GtkMenu)
* @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
@@ -78,6 +79,7 @@ typedef enum
GDK_WINDOW_ROOT,
GDK_WINDOW_TOPLEVEL,
GDK_WINDOW_CHILD,
GDK_WINDOW_DIALOG,
GDK_WINDOW_TEMP,
GDK_WINDOW_FOREIGN,
GDK_WINDOW_OFFSCREEN
@@ -731,6 +733,13 @@ void gdk_window_coords_from_parent (GdkWindow *window,
gdouble *x,
gdouble *y);
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
/* Used by gtk_handle_box_button_changed () */
gboolean gdk_window_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y);
#endif
void gdk_window_get_root_origin (GdkWindow *window,
gint *x,
gint *y);
+3
View File
@@ -93,6 +93,9 @@ struct _GdkWindowImplIface
gint y,
gint *root_x,
gint *root_y);
gint (* get_deskrelative_origin) (GdkWindow *window,
gint *x,
gint *y);
gboolean (* get_device_state) (GdkWindow *window,
GdkDevice *device,
gint *x,
+12 -1
View File
@@ -854,6 +854,7 @@ _gdk_window_impl_new (GdkWindow *window,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
if (GDK_WINDOW_TYPE (private->parent) != GDK_WINDOW_ROOT)
{
@@ -905,9 +906,10 @@ _gdk_window_impl_new (GdkWindow *window,
impl->view = NULL;
switch (attributes->window_type)
switch (attributes->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
{
NSScreen *screen;
@@ -1830,6 +1832,14 @@ gdk_window_quartz_get_root_coords (GdkWindow *window,
return TRUE;
}
static gboolean
gdk_window_quartz_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y)
{
return gdk_window_get_origin (window, x, y);
}
void
gdk_window_get_root_origin (GdkWindow *window,
gint *x,
@@ -3049,6 +3059,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->get_geometry = gdk_window_quartz_get_geometry;
iface->get_root_coords = gdk_window_quartz_get_root_coords;
iface->get_device_state = gdk_window_quartz_get_device_state;
iface->get_deskrelative_origin = gdk_window_quartz_get_deskrelative_origin;
iface->shape_combine_region = gdk_window_quartz_shape_combine_region;
iface->input_shape_combine_region = gdk_window_quartz_input_shape_combine_region;
iface->set_static_gravities = gdk_window_quartz_set_static_gravities;
+1 -24
View File
@@ -33,8 +33,6 @@
#include <windows.h>
#include <wintab.h>
#define WINTAB32_DLL "Wintab32.dll"
#define PACKETDATA (PK_CONTEXT | PK_CURSOR | PK_BUTTONS | PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_ORIENTATION)
/* We want everything in absolute mode */
#define PACKETMODE (0)
@@ -378,9 +376,6 @@ _gdk_input_wintab_init_check (GdkDeviceManagerWin32 *device_manager)
gchar *devname_utf8, *csrname_utf8, *device_name;
BOOL defcontext_done;
HMODULE wintab32;
char *wintab32_dll_path;
char dummy;
int n, k;
if (wintab_initialized)
return;
@@ -392,25 +387,7 @@ _gdk_input_wintab_init_check (GdkDeviceManagerWin32 *device_manager)
if (_gdk_input_ignore_wintab)
return;
n = GetSystemDirectory (&dummy, 0);
if (n <= 0)
return;
wintab32_dll_path = g_malloc (n + 1 + strlen (WINTAB32_DLL));
k = GetSystemDirectory (wintab32_dll_path, n);
if (k == 0 || k > n)
{
g_free (wintab32_dll_path);
return;
}
if (!G_IS_DIR_SEPARATOR (wintab32_dll_path[strlen (wintab32_dll_path) -1]))
strcat (wintab32_dll_path, G_DIR_SEPARATOR_S);
strcat (wintab32_dll_path, WINTAB32_DLL);
if ((wintab32 = LoadLibrary (wintab32_dll_path)) == NULL)
if ((wintab32 = LoadLibrary ("wintab32.dll")) == NULL)
return;
if ((p_WTInfoA = (t_WTInfoA) GetProcAddress (wintab32, "WTInfoA")) == NULL)
+37 -16
View File
@@ -152,19 +152,40 @@ static void
track_mouse_event (DWORD dwFlags,
HWND hwnd)
{
TRACKMOUSEEVENT tme;
typedef BOOL (WINAPI *PFN_TrackMouseEvent) (LPTRACKMOUSEEVENT);
static PFN_TrackMouseEvent p_TrackMouseEvent = NULL;
static gboolean once = FALSE;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = dwFlags;
tme.hwndTrack = hwnd;
tme.dwHoverTime = HOVER_DEFAULT; /* not used */
if (!once)
{
HMODULE user32;
HINSTANCE commctrl32;
if (!TrackMouseEvent (&tme))
WIN32_API_FAILED ("TrackMouseEvent");
else if (dwFlags == TME_LEAVE)
GDK_NOTE (EVENTS, g_print(" (TrackMouseEvent %p)", hwnd));
else if (dwFlags == TME_CANCEL)
GDK_NOTE (EVENTS, g_print(" (cancel TrackMouseEvent %p)", hwnd));
user32 = GetModuleHandle ("user32.dll");
if ((p_TrackMouseEvent = (PFN_TrackMouseEvent)GetProcAddress (user32, "TrackMouseEvent")) == NULL)
{
if ((commctrl32 = LoadLibrary ("commctrl32.dll")) != NULL)
p_TrackMouseEvent = (PFN_TrackMouseEvent)
GetProcAddress (commctrl32, "_TrackMouseEvent");
}
once = TRUE;
}
if (p_TrackMouseEvent)
{
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = dwFlags;
tme.hwndTrack = hwnd;
tme.dwHoverTime = HOVER_DEFAULT; /* not used */
if (!p_TrackMouseEvent (&tme))
WIN32_API_FAILED ("TrackMouseEvent");
else if (dwFlags == TME_LEAVE)
GDK_NOTE (EVENTS, g_print(" (TrackMouseEvent %p)", hwnd));
else if (dwFlags == TME_CANCEL)
GDK_NOTE (EVENTS, g_print(" (cancel TrackMouseEvent %p)", hwnd));
}
}
gulong
@@ -966,7 +987,7 @@ fill_key_event_string (GdkEvent *event)
*/
c = 0;
if (event->key.keyval != GDK_KEY_VoidSymbol)
if (event->key.keyval != GDK_VoidSymbol)
c = gdk_keyval_to_unicode (event->key.keyval);
if (c)
@@ -1003,13 +1024,13 @@ fill_key_event_string (GdkEvent *event)
if (event->key.string)
event->key.length = bytes_written;
}
else if (event->key.keyval == GDK_KEY_Escape)
else if (event->key.keyval == GDK_Escape)
{
event->key.length = 1;
event->key.string = g_strdup ("\033");
}
else if (event->key.keyval == GDK_KEY_Return ||
event->key.keyval == GDK_KEY_KP_Enter)
else if (event->key.keyval == GDK_Return ||
event->key.keyval == GDK_KP_Enter)
{
event->key.length = 1;
event->key.string = g_strdup ("\r");
@@ -2063,7 +2084,7 @@ gdk_event_translate (MSG *msg,
GDK_KEY_PRESS : GDK_KEY_RELEASE);
event->key.window = window;
event->key.time = _gdk_win32_get_next_tick (msg->time);
event->key.keyval = GDK_KEY_VoidSymbol;
event->key.keyval = GDK_VoidSymbol;
event->key.string = NULL;
event->key.length = 0;
event->key.hardware_keycode = msg->wParam;
+119 -119
View File
@@ -83,154 +83,154 @@ handle_special (guint vk,
switch (vk)
{
case VK_CANCEL:
*ksymp = GDK_KEY_Cancel; break;
*ksymp = GDK_Cancel; break;
case VK_BACK:
*ksymp = GDK_KEY_BackSpace; break;
*ksymp = GDK_BackSpace; break;
case VK_TAB:
if (shift & 0x1)
*ksymp = GDK_KEY_ISO_Left_Tab;
*ksymp = GDK_ISO_Left_Tab;
else
*ksymp = GDK_KEY_Tab;
*ksymp = GDK_Tab;
break;
case VK_CLEAR:
*ksymp = GDK_KEY_Clear; break;
*ksymp = GDK_Clear; break;
case VK_RETURN:
*ksymp = GDK_KEY_Return; break;
*ksymp = GDK_Return; break;
case VK_SHIFT:
case VK_LSHIFT:
*ksymp = GDK_KEY_Shift_L; break;
*ksymp = GDK_Shift_L; break;
case VK_CONTROL:
case VK_LCONTROL:
*ksymp = GDK_KEY_Control_L; break;
*ksymp = GDK_Control_L; break;
case VK_MENU:
case VK_LMENU:
*ksymp = GDK_KEY_Alt_L; break;
*ksymp = GDK_Alt_L; break;
case VK_PAUSE:
*ksymp = GDK_KEY_Pause; break;
*ksymp = GDK_Pause; break;
case VK_ESCAPE:
*ksymp = GDK_KEY_Escape; break;
*ksymp = GDK_Escape; break;
case VK_PRIOR:
*ksymp = GDK_KEY_Prior; break;
*ksymp = GDK_Prior; break;
case VK_NEXT:
*ksymp = GDK_KEY_Next; break;
*ksymp = GDK_Next; break;
case VK_END:
*ksymp = GDK_KEY_End; break;
*ksymp = GDK_End; break;
case VK_HOME:
*ksymp = GDK_KEY_Home; break;
*ksymp = GDK_Home; break;
case VK_LEFT:
*ksymp = GDK_KEY_Left; break;
*ksymp = GDK_Left; break;
case VK_UP:
*ksymp = GDK_KEY_Up; break;
*ksymp = GDK_Up; break;
case VK_RIGHT:
*ksymp = GDK_KEY_Right; break;
*ksymp = GDK_Right; break;
case VK_DOWN:
*ksymp = GDK_KEY_Down; break;
*ksymp = GDK_Down; break;
case VK_SELECT:
*ksymp = GDK_KEY_Select; break;
*ksymp = GDK_Select; break;
case VK_PRINT:
*ksymp = GDK_KEY_Print; break;
*ksymp = GDK_Print; break;
case VK_EXECUTE:
*ksymp = GDK_KEY_Execute; break;
*ksymp = GDK_Execute; break;
case VK_INSERT:
*ksymp = GDK_KEY_Insert; break;
*ksymp = GDK_Insert; break;
case VK_DELETE:
*ksymp = GDK_KEY_Delete; break;
*ksymp = GDK_Delete; break;
case VK_HELP:
*ksymp = GDK_KEY_Help; break;
*ksymp = GDK_Help; break;
case VK_LWIN:
*ksymp = GDK_KEY_Meta_L; break;
*ksymp = GDK_Meta_L; break;
case VK_RWIN:
*ksymp = GDK_KEY_Meta_R; break;
*ksymp = GDK_Meta_R; break;
case VK_APPS:
*ksymp = GDK_KEY_Menu; break;
*ksymp = GDK_Menu; break;
case VK_MULTIPLY:
*ksymp = GDK_KEY_KP_Multiply; break;
*ksymp = GDK_KP_Multiply; break;
case VK_ADD:
*ksymp = GDK_KEY_KP_Add; break;
*ksymp = GDK_KP_Add; break;
case VK_SEPARATOR:
*ksymp = GDK_KEY_KP_Separator; break;
*ksymp = GDK_KP_Separator; break;
case VK_SUBTRACT:
*ksymp = GDK_KEY_KP_Subtract; break;
*ksymp = GDK_KP_Subtract; break;
case VK_DIVIDE:
*ksymp = GDK_KEY_KP_Divide; break;
*ksymp = GDK_KP_Divide; break;
case VK_NUMPAD0:
*ksymp = GDK_KEY_KP_0; break;
*ksymp = GDK_KP_0; break;
case VK_NUMPAD1:
*ksymp = GDK_KEY_KP_1; break;
*ksymp = GDK_KP_1; break;
case VK_NUMPAD2:
*ksymp = GDK_KEY_KP_2; break;
*ksymp = GDK_KP_2; break;
case VK_NUMPAD3:
*ksymp = GDK_KEY_KP_3; break;
*ksymp = GDK_KP_3; break;
case VK_NUMPAD4:
*ksymp = GDK_KEY_KP_4; break;
*ksymp = GDK_KP_4; break;
case VK_NUMPAD5:
*ksymp = GDK_KEY_KP_5; break;
*ksymp = GDK_KP_5; break;
case VK_NUMPAD6:
*ksymp = GDK_KEY_KP_6; break;
*ksymp = GDK_KP_6; break;
case VK_NUMPAD7:
*ksymp = GDK_KEY_KP_7; break;
*ksymp = GDK_KP_7; break;
case VK_NUMPAD8:
*ksymp = GDK_KEY_KP_8; break;
*ksymp = GDK_KP_8; break;
case VK_NUMPAD9:
*ksymp = GDK_KEY_KP_9; break;
*ksymp = GDK_KP_9; break;
case VK_F1:
*ksymp = GDK_KEY_F1; break;
*ksymp = GDK_F1; break;
case VK_F2:
*ksymp = GDK_KEY_F2; break;
*ksymp = GDK_F2; break;
case VK_F3:
*ksymp = GDK_KEY_F3; break;
*ksymp = GDK_F3; break;
case VK_F4:
*ksymp = GDK_KEY_F4; break;
*ksymp = GDK_F4; break;
case VK_F5:
*ksymp = GDK_KEY_F5; break;
*ksymp = GDK_F5; break;
case VK_F6:
*ksymp = GDK_KEY_F6; break;
*ksymp = GDK_F6; break;
case VK_F7:
*ksymp = GDK_KEY_F7; break;
*ksymp = GDK_F7; break;
case VK_F8:
*ksymp = GDK_KEY_F8; break;
*ksymp = GDK_F8; break;
case VK_F9:
*ksymp = GDK_KEY_F9; break;
*ksymp = GDK_F9; break;
case VK_F10:
*ksymp = GDK_KEY_F10; break;
*ksymp = GDK_F10; break;
case VK_F11:
*ksymp = GDK_KEY_F11; break;
*ksymp = GDK_F11; break;
case VK_F12:
*ksymp = GDK_KEY_F12; break;
*ksymp = GDK_F12; break;
case VK_F13:
*ksymp = GDK_KEY_F13; break;
*ksymp = GDK_F13; break;
case VK_F14:
*ksymp = GDK_KEY_F14; break;
*ksymp = GDK_F14; break;
case VK_F15:
*ksymp = GDK_KEY_F15; break;
*ksymp = GDK_F15; break;
case VK_F16:
*ksymp = GDK_KEY_F16; break;
*ksymp = GDK_F16; break;
case VK_F17:
*ksymp = GDK_KEY_F17; break;
*ksymp = GDK_F17; break;
case VK_F18:
*ksymp = GDK_KEY_F18; break;
*ksymp = GDK_F18; break;
case VK_F19:
*ksymp = GDK_KEY_F19; break;
*ksymp = GDK_F19; break;
case VK_F20:
*ksymp = GDK_KEY_F20; break;
*ksymp = GDK_F20; break;
case VK_F21:
*ksymp = GDK_KEY_F21; break;
*ksymp = GDK_F21; break;
case VK_F22:
*ksymp = GDK_KEY_F22; break;
*ksymp = GDK_F22; break;
case VK_F23:
*ksymp = GDK_KEY_F23; break;
*ksymp = GDK_F23; break;
case VK_F24:
*ksymp = GDK_KEY_F24; break;
*ksymp = GDK_F24; break;
case VK_NUMLOCK:
*ksymp = GDK_KEY_Num_Lock; break;
*ksymp = GDK_Num_Lock; break;
case VK_SCROLL:
*ksymp = GDK_KEY_Scroll_Lock; break;
*ksymp = GDK_Scroll_Lock; break;
case VK_RSHIFT:
*ksymp = GDK_KEY_Shift_R; break;
*ksymp = GDK_Shift_R; break;
case VK_RCONTROL:
*ksymp = GDK_KEY_Control_R; break;
*ksymp = GDK_Control_R; break;
case VK_RMENU:
*ksymp = GDK_KEY_Alt_R; break;
*ksymp = GDK_Alt_R; break;
}
}
@@ -283,39 +283,39 @@ handle_dead (guint keysym,
switch (keysym)
{
case '"': /* 0x022 */
*ksymp = GDK_KEY_dead_diaeresis; break;
*ksymp = GDK_dead_diaeresis; break;
case '\'': /* 0x027 */
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_asciicircum: /* 0x05e */
*ksymp = GDK_KEY_dead_circumflex; break;
case GDK_KEY_grave: /* 0x060 */
*ksymp = GDK_KEY_dead_grave; break;
case GDK_KEY_asciitilde: /* 0x07e */
*ksymp = GDK_KEY_dead_tilde; break;
case GDK_KEY_diaeresis: /* 0x0a8 */
*ksymp = GDK_KEY_dead_diaeresis; break;
case GDK_KEY_degree: /* 0x0b0 */
*ksymp = GDK_KEY_dead_abovering; break;
case GDK_KEY_acute: /* 0x0b4 */
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_periodcentered: /* 0x0b7 */
*ksymp = GDK_KEY_dead_abovedot; break;
case GDK_KEY_cedilla: /* 0x0b8 */
*ksymp = GDK_KEY_dead_cedilla; break;
case GDK_KEY_breve: /* 0x1a2 */
*ksymp = GDK_KEY_dead_breve; break;
case GDK_KEY_ogonek: /* 0x1b2 */
*ksymp = GDK_KEY_dead_ogonek; break;
case GDK_KEY_caron: /* 0x1b7 */
*ksymp = GDK_KEY_dead_caron; break;
case GDK_KEY_doubleacute: /* 0x1bd */
*ksymp = GDK_KEY_dead_doubleacute; break;
case GDK_KEY_abovedot: /* 0x1ff */
*ksymp = GDK_KEY_dead_abovedot; break;
*ksymp = GDK_dead_acute; break;
case GDK_asciicircum: /* 0x05e */
*ksymp = GDK_dead_circumflex; break;
case GDK_grave: /* 0x060 */
*ksymp = GDK_dead_grave; break;
case GDK_asciitilde: /* 0x07e */
*ksymp = GDK_dead_tilde; break;
case GDK_diaeresis: /* 0x0a8 */
*ksymp = GDK_dead_diaeresis; break;
case GDK_degree: /* 0x0b0 */
*ksymp = GDK_dead_abovering; break;
case GDK_acute: /* 0x0b4 */
*ksymp = GDK_dead_acute; break;
case GDK_periodcentered: /* 0x0b7 */
*ksymp = GDK_dead_abovedot; break;
case GDK_cedilla: /* 0x0b8 */
*ksymp = GDK_dead_cedilla; break;
case GDK_breve: /* 0x1a2 */
*ksymp = GDK_dead_breve; break;
case GDK_ogonek: /* 0x1b2 */
*ksymp = GDK_dead_ogonek; break;
case GDK_caron: /* 0x1b7 */
*ksymp = GDK_dead_caron; break;
case GDK_doubleacute: /* 0x1bd */
*ksymp = GDK_dead_doubleacute; break;
case GDK_abovedot: /* 0x1ff */
*ksymp = GDK_dead_abovedot; break;
case 0x1000384: /* Greek tonos */
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_KEY_Greek_accentdieresis; break;
*ksymp = GDK_dead_acute; break;
case GDK_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_Greek_accentdieresis; break;
default:
/* By default use the keysym as such. This takes care of for
* instance the dead U+09CD (BENGALI VIRAMA) on the ekushey
@@ -354,7 +354,7 @@ update_keymap (void)
keysym_tab[vk*4+0] =
keysym_tab[vk*4+1] =
keysym_tab[vk*4+2] =
keysym_tab[vk*4+3] = GDK_KEY_VoidSymbol;
keysym_tab[vk*4+3] = GDK_VoidSymbol;
else
{
gint shift;
@@ -434,7 +434,7 @@ update_keymap (void)
}
}
if (*ksymp == 0)
*ksymp = GDK_KEY_VoidSymbol;
*ksymp = GDK_VoidSymbol;
}
key_state[vk] = 0;
@@ -442,9 +442,9 @@ update_keymap (void)
* the mapping with Control+Alt is different.
*/
if (!_gdk_keyboard_has_altgr)
if ((keysym_tab[vk*4 + 2] != GDK_KEY_VoidSymbol &&
if ((keysym_tab[vk*4 + 2] != GDK_VoidSymbol &&
keysym_tab[vk*4] != keysym_tab[vk*4 + 2]) ||
(keysym_tab[vk*4 + 3] != GDK_KEY_VoidSymbol &&
(keysym_tab[vk*4 + 3] != GDK_VoidSymbol &&
keysym_tab[vk*4 + 1] != keysym_tab[vk*4 + 3]))
_gdk_keyboard_has_altgr = TRUE;
@@ -472,8 +472,8 @@ update_keymap (void)
if (ToAsciiEx (vk, scancode, key_state,
(LPWORD) chars, 0, _gdk_input_locale) == 1)
{
if (chars[0] >= GDK_KEY_space &&
chars[0] <= GDK_KEY_asciitilde &&
if (chars[0] >= GDK_space &&
chars[0] <= GDK_asciitilde &&
chars[0] == keysym_tab[vk*4 + 1])
{
/* CapsLock acts as ShiftLock */
@@ -735,7 +735,7 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
sym = keysym_tab[key->keycode*4 + key->group*2 + key->level];
if (sym == GDK_KEY_VoidSymbol)
if (sym == GDK_VoidSymbol)
return 0;
else
return sym;
@@ -804,23 +804,23 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
* the key for those.
*/
if (shift_level == 1 &&
keyvals[group*2 + 1] == GDK_KEY_VoidSymbol &&
keyvals[group*2] != GDK_KEY_VoidSymbol)
keyvals[group*2 + 1] == GDK_VoidSymbol &&
keyvals[group*2] != GDK_VoidSymbol)
{
shift_level = 0;
ignore_shift = TRUE;
}
if (group == 1 &&
keyvals[2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + shift_level] != GDK_KEY_VoidSymbol)
keyvals[2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + shift_level] != GDK_VoidSymbol)
{
group = 0;
ignore_group = TRUE;
}
if (keyvals[group *2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + 0] != GDK_KEY_VoidSymbol)
if (keyvals[group *2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + 0] != GDK_VoidSymbol)
{
shift_level = 0;
group = 0;
@@ -831,11 +831,11 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
/* See whether the group and shift level actually mattered
* to know what to put in consumed_modifiers
*/
if (keyvals[group*2 + 1] == GDK_KEY_VoidSymbol ||
if (keyvals[group*2 + 1] == GDK_VoidSymbol ||
keyvals[group*2 + 0] == keyvals[group*2 + 1])
ignore_shift = TRUE;
if (keyvals[2 + shift_level] == GDK_KEY_VoidSymbol ||
if (keyvals[2 + shift_level] == GDK_VoidSymbol ||
keyvals[0 + shift_level] == keyvals[2 + shift_level])
ignore_group = TRUE;
@@ -875,7 +875,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval)));
#endif
return tmp_keyval != GDK_KEY_VoidSymbol;
return tmp_keyval != GDK_VoidSymbol;
}
void
+29 -3
View File
@@ -308,6 +308,7 @@ static ATOM
RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
{
static ATOM klassTOPLEVEL = 0;
static ATOM klassDIALOG = 0;
static ATOM klassCHILD = 0;
static ATOM klassTEMP = 0;
static ATOM klassTEMPSHADOW = 0;
@@ -400,6 +401,17 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
klass = klassCHILD;
break;
case GDK_WINDOW_DIALOG:
if (0 == klassDIALOG)
{
wcl.lpszClassName = L"gdkWindowDialog";
wcl.style |= CS_SAVEBITS;
ONCE_PER_CLASS ();
klassDIALOG = RegisterClassExW (&wcl);
}
klass = klassDIALOG;
break;
case GDK_WINDOW_TEMP:
if ((wtype_hint == GDK_WINDOW_TYPE_HINT_MENU) ||
(wtype_hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU) ||
@@ -480,8 +492,9 @@ _gdk_window_impl_new (GdkWindow *window,
g_print ("_gdk_window_impl_new: %s\n",
(attributes->window_type == GDK_WINDOW_TOPLEVEL ? "TOPLEVEL" :
(attributes->window_type == GDK_WINDOW_CHILD ? "CHILD" :
(attributes->window_type == GDK_WINDOW_DIALOG ? "DIALOG" :
(attributes->window_type == GDK_WINDOW_TEMP ? "TEMP" :
"???")))));
"???"))))));
hparent = GDK_WINDOW_HWND (real_parent);
@@ -541,6 +554,7 @@ _gdk_window_impl_new (GdkWindow *window,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
if (GDK_WINDOW_TYPE (private->parent) != GDK_WINDOW_ROOT)
{
/* The common code warns for this case. */
@@ -1047,7 +1061,8 @@ show_window_internal (GdkWindow *window,
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
{
if (focus_on_map && private->accept_focus)
{
@@ -1384,6 +1399,7 @@ gdk_win32_window_reparent (GdkWindow *window,
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_CHILD:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
if (WINDOW_IS_TOPLEVEL (window))
{
@@ -1488,7 +1504,8 @@ get_effective_window_decorations (GdkWindow *window,
if (gdk_window_get_decorations (window, decoration))
return TRUE;
if (((GdkWindowObject *) window)->window_type != GDK_WINDOW_TOPLEVEL)
if (((GdkWindowObject *) window)->window_type != GDK_WINDOW_TOPLEVEL &&
((GdkWindowObject *) window)->window_type != GDK_WINDOW_DIALOG)
{
return FALSE;
}
@@ -1959,6 +1976,14 @@ gdk_win32_window_get_root_coords (GdkWindow *window,
return 1;
}
static gboolean
gdk_win32_window_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y)
{
return gdk_win32_window_get_root_coords (window, 0, 0, x, y);
}
static void
gdk_win32_window_restack_under (GdkWindow *window,
GList *native_siblings)
@@ -3519,6 +3544,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->get_root_coords = gdk_win32_window_get_root_coords;
iface->shape_combine_region = gdk_win32_window_shape_combine_region;
iface->input_shape_combine_region = gdk_win32_input_shape_combine_region;
iface->get_deskrelative_origin = gdk_win32_window_get_deskrelative_origin;
iface->set_static_gravities = gdk_win32_window_set_static_gravities;
iface->queue_antiexpose = _gdk_win32_window_queue_antiexpose;
iface->translate = _gdk_win32_window_translate;
+1 -5
View File
@@ -311,11 +311,7 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
if (files_count == 0)
description = g_strdup_printf (_("Starting %s"), g_app_info_get_name (info));
else if (files_count == 1)
{
gchar *display_name = get_display_name (files->data);
description = g_strdup_printf (_("Opening %s"), display_name);
g_free (display_name);
}
description = g_strdup_printf (_("Opening %s"), get_display_name (files->data));
else
description = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
"Opening %d Item",
+5 -5
View File
@@ -155,7 +155,7 @@ translate_key_event (GdkDisplay *display,
event->key.group = _gdk_x11_get_group_for_state (display, xevent->xkey.state);
event->key.hardware_keycode = xevent->xkey.keycode;
event->key.keyval = GDK_KEY_VoidSymbol;
event->key.keyval = GDK_VoidSymbol;
gdk_keymap_translate_keyboard_state (keymap,
event->key.hardware_keycode,
@@ -175,7 +175,7 @@ translate_key_event (GdkDisplay *display,
*/
event->key.string = NULL;
if (event->key.keyval != GDK_KEY_VoidSymbol)
if (event->key.keyval != GDK_VoidSymbol)
c = gdk_keyval_to_unicode (event->key.keyval);
if (c)
@@ -209,13 +209,13 @@ translate_key_event (GdkDisplay *display,
if (event->key.string)
event->key.length = bytes_written;
}
else if (event->key.keyval == GDK_KEY_Escape)
else if (event->key.keyval == GDK_Escape)
{
event->key.length = 1;
event->key.string = g_strdup ("\033");
}
else if (event->key.keyval == GDK_KEY_Return ||
event->key.keyval == GDK_KEY_KP_Enter)
else if (event->key.keyval == GDK_Return ||
event->key.keyval == GDK_KP_Enter)
{
event->key.length = 1;
event->key.string = g_strdup ("\r");
+5 -5
View File
@@ -577,7 +577,7 @@ translate_keyboard_string (GdkEventKey *event)
*/
event->string = NULL;
if (event->keyval != GDK_KEY_VoidSymbol)
if (event->keyval != GDK_VoidSymbol)
c = gdk_keyval_to_unicode (event->keyval);
if (c)
@@ -611,13 +611,13 @@ translate_keyboard_string (GdkEventKey *event)
if (event->string)
event->length = bytes_written;
}
else if (event->keyval == GDK_KEY_Escape)
else if (event->keyval == GDK_Escape)
{
event->length = 1;
event->string = g_strdup ("\033");
}
else if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_KP_Enter)
else if (event->keyval == GDK_Return ||
event->keyval == GDK_KP_Enter)
{
event->length = 1;
event->string = g_strdup ("\r");
@@ -924,7 +924,7 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
GUINT_TO_POINTER (xev->deviceid));
gdk_event_set_device (event, device);
event->key.keyval = GDK_KEY_VoidSymbol;
event->key.keyval = GDK_VoidSymbol;
gdk_keymap_translate_keyboard_state (keymap,
event->key.hardware_keycode,
+6 -1
View File
@@ -1968,7 +1968,12 @@ _gdk_windowing_set_default_display (GdkDisplay *display)
const gchar *startup_id;
if (!display)
return;
{
gdk_display = NULL;
return;
}
gdk_display = GDK_DISPLAY_XDISPLAY (display);
g_free (display_x11->startup_notification_id);
display_x11->startup_notification_id = NULL;
+1
View File
@@ -32,5 +32,6 @@
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
Display *gdk_display = NULL;
GdkAtom _gdk_selection_property;
gboolean _gdk_synchronize = FALSE;
+24 -26
View File
@@ -163,7 +163,7 @@ gdk_keymap_x11_init (GdkKeymapX11 *keymap)
keymap->num_lock_mask = 0;
keymap->sun_keypad = FALSE;
keymap->group_switch_mask = 0;
keymap->lock_keysym = GDK_KEY_Caps_Lock;
keymap->lock_keysym = GDK_Caps_Lock;
keymap->have_direction = FALSE;
keymap->current_serial = 0;
@@ -396,8 +396,8 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
/* Check both groups */
for (i = 0 ; i < 2 ; i++)
{
if (get_symbol (syms, keymap_x11, i, 0) == GDK_KEY_Tab)
set_symbol (syms, keymap_x11, i, 1, GDK_KEY_ISO_Left_Tab);
if (get_symbol (syms, keymap_x11, i, 0) == GDK_Tab)
set_symbol (syms, keymap_x11, i, 1, GDK_ISO_Left_Tab);
}
/*
@@ -423,7 +423,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
keymap_x11->mod_keymap = XGetModifierMapping (xdisplay);
keymap_x11->lock_keysym = GDK_KEY_VoidSymbol;
keymap_x11->lock_keysym = GDK_VoidSymbol;
keymap_x11->group_switch_mask = 0;
keymap_x11->num_lock_mask = 0;
@@ -452,14 +452,14 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
mask = 0;
for (j = 0; j < keymap_x11->keysyms_per_keycode; j++)
{
if (syms[j] == GDK_KEY_Meta_L ||
syms[j] == GDK_KEY_Meta_R)
if (syms[j] == GDK_Meta_L ||
syms[j] == GDK_Meta_R)
mask |= GDK_META_MASK;
else if (syms[j] == GDK_KEY_Hyper_L ||
syms[j] == GDK_KEY_Hyper_R)
else if (syms[j] == GDK_Hyper_L ||
syms[j] == GDK_Hyper_R)
mask |= GDK_HYPER_MASK;
else if (syms[j] == GDK_KEY_Super_L ||
syms[j] == GDK_KEY_Super_R)
else if (syms[j] == GDK_Super_L ||
syms[j] == GDK_Super_R)
mask |= GDK_SUPER_MASK;
}
@@ -481,11 +481,11 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
*/
for (j = 0; j < keymap_x11->keysyms_per_keycode; j++)
{
if (syms[j] == GDK_KEY_Caps_Lock)
keymap_x11->lock_keysym = GDK_KEY_Caps_Lock;
else if (syms[j] == GDK_KEY_Shift_Lock &&
keymap_x11->lock_keysym == GDK_KEY_VoidSymbol)
keymap_x11->lock_keysym = GDK_KEY_Shift_Lock;
if (syms[j] == GDK_Caps_Lock)
keymap_x11->lock_keysym = GDK_Caps_Lock;
else if (syms[j] == GDK_Shift_Lock &&
keymap_x11->lock_keysym == GDK_VoidSymbol)
keymap_x11->lock_keysym = GDK_Shift_Lock;
}
break;
@@ -502,12 +502,12 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
/* Find the Mode_Switch and Num_Lock modifiers. */
for (j = 0; j < keymap_x11->keysyms_per_keycode; j++)
{
if (syms[j] == GDK_KEY_Mode_switch)
if (syms[j] == GDK_Mode_switch)
{
/* This modifier swaps groups */
keymap_x11->group_switch_mask |= mask;
}
else if (syms[j] == GDK_KEY_Num_Lock)
else if (syms[j] == GDK_Num_Lock)
{
/* This modifier is used for Num_Lock */
keymap_x11->num_lock_mask |= mask;
@@ -1366,7 +1366,7 @@ translate_keysym (GdkKeymapX11 *keymap_x11,
gint num_lock_index;
shift_modifiers = GDK_SHIFT_MASK;
if (keymap_x11->lock_keysym == GDK_KEY_Shift_Lock)
if (keymap_x11->lock_keysym == GDK_Shift_Lock)
shift_modifiers |= GDK_LOCK_MASK;
/* Fall back to the first group if the passed in group is empty
@@ -1416,7 +1416,7 @@ translate_keysym (GdkKeymapX11 *keymap_x11,
tmp_keyval = SYM (keymap_x11, group, shift_level);
if (keymap_x11->lock_keysym == GDK_KEY_Caps_Lock && (state & GDK_LOCK_MASK) != 0)
if (keymap_x11->lock_keysym == GDK_Caps_Lock && (state & GDK_LOCK_MASK) != 0)
{
guint upper = gdk_keyval_to_upper (tmp_keyval);
if (upper != tmp_keyval)
@@ -1614,13 +1614,13 @@ gdk_keyval_name (guint keyval)
{
switch (keyval)
{
case GDK_KEY_Page_Up:
case GDK_Page_Up:
return "Page_Up";
case GDK_KEY_Page_Down:
case GDK_Page_Down:
return "Page_Down";
case GDK_KEY_KP_Page_Up:
case GDK_KP_Page_Up:
return "KP_Page_Up";
case GDK_KEY_KP_Page_Down:
case GDK_KP_Page_Down:
return "KP_Page_Down";
}
@@ -1822,9 +1822,7 @@ gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_KEYMAP_X11 (keymap);
if (KEYMAP_USE_XKB (keymap))
get_xkb (keymap_x11);
get_xkb (keymap_x11);
retval = TRUE;
+63 -2
View File
@@ -593,13 +593,17 @@ setup_toplevel_window (GdkWindow *window,
GdkDisplay *display = gdk_drawable_get_display (window);
Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
XID xid = GDK_WINDOW_XID (window);
XID xparent = GDK_WINDOW_XID (parent);
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (parent));
XSizeHints size_hints;
long pid;
Window leader_window;
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
XSetTransientForHint (xdisplay, xid, xparent);
set_wm_protocols (window);
if (!obj->input_only)
{
/* The focus window is off the visible area, and serves to receive key
@@ -719,6 +723,7 @@ _gdk_window_impl_new (GdkWindow *window,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
if (GDK_WINDOW_TYPE (private->parent) != GDK_WINDOW_ROOT)
{
@@ -804,6 +809,7 @@ _gdk_window_impl_new (GdkWindow *window,
switch (GDK_WINDOW_TYPE (private))
{
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
if (attributes_mask & GDK_WA_TITLE)
@@ -1420,6 +1426,7 @@ gdk_window_x11_hide (GdkWindow *window)
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP: /* ? */
gdk_window_withdraw (window);
return;
@@ -1652,6 +1659,7 @@ gdk_window_x11_reparent (GdkWindow *window,
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_CHILD:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP:
if (WINDOW_IS_TOPLEVEL (window) &&
impl->toplevel)
@@ -2762,6 +2770,58 @@ gdk_window_x11_get_root_coords (GdkWindow *window,
return return_val;
}
static gboolean
gdk_window_x11_get_deskrelative_origin (GdkWindow *window,
gint *x,
gint *y)
{
gboolean return_val = FALSE;
gint num_children, format_return;
Window win, *child, parent, root;
Atom type_return;
Atom atom;
gulong number_return, bytes_after_return;
guchar *data_return;
atom = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
"ENLIGHTENMENT_DESKTOP");
win = GDK_WINDOW_XID (window);
while (XQueryTree (GDK_WINDOW_XDISPLAY (window), win, &root, &parent,
&child, (unsigned int *)&num_children))
{
if ((child) && (num_children > 0))
XFree (child);
if (!parent)
break;
else
win = parent;
if (win == root)
break;
data_return = NULL;
XGetWindowProperty (GDK_WINDOW_XDISPLAY (window), win, atom, 0, 0,
False, XA_CARDINAL, &type_return, &format_return,
&number_return, &bytes_after_return, &data_return);
if (type_return == XA_CARDINAL)
{
XFree (data_return);
break;
}
}
return_val = XTranslateCoordinates (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
win,
0, 0, x, y,
&root);
return return_val;
}
/**
* gdk_window_get_root_origin:
* @window: a toplevel #GdkWindow
@@ -5506,6 +5566,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->get_geometry = gdk_window_x11_get_geometry;
iface->get_root_coords = gdk_window_x11_get_root_coords;
iface->get_device_state = gdk_window_x11_get_device_state;
iface->get_deskrelative_origin = gdk_window_x11_get_deskrelative_origin;
iface->shape_combine_region = gdk_window_x11_shape_combine_region;
iface->input_shape_combine_region = gdk_window_x11_input_shape_combine_region;
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
+8
View File
@@ -34,6 +34,10 @@
G_BEGIN_DECLS
#ifndef GDK_MULTIHEAD_SAFE
extern Display *gdk_display;
#endif
Display *gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable);
XID gdk_x11_drawable_get_xid (GdkDrawable *drawable);
GdkDrawable *gdk_x11_window_get_drawable_impl (GdkWindow *window);
@@ -63,6 +67,10 @@ gint gdk_x11_get_default_screen (void);
#define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor))
#define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor))
#ifndef GDK_MULTIHEAD_SAFE
#define GDK_DISPLAY() gdk_display
#endif
#ifdef GDK_COMPILATION
#include "gdkprivate-x11.h"
+3 -2
View File
@@ -230,6 +230,7 @@ gtk_public_h_sources = \
gtkimmulticontext.h \
gtkinfobar.h \
gtkinvisible.h \
gtkitem.h \
gtklabel.h \
gtklayout.h \
gtklinkbutton.h \
@@ -371,7 +372,6 @@ gtk_private_h_sources = \
gtkiconcache.h \
gtkintl.h \
gtkkeyhash.h \
gtkmenuprivate.h \
gtkmnemonichash.h \
gtkmountoperationprivate.h \
gtkpango.h \
@@ -496,6 +496,7 @@ gtk_base_c_sources = \
gtkimmulticontext.c \
gtkinfobar.c \
gtkinvisible.c \
gtkitem.c \
gtkkeyhash.c \
gtklabel.c \
gtklayout.c \
@@ -906,7 +907,7 @@ introspection_files = \
gtktypebuiltins.c
Gtk-3.0.gir: $(INTROSPECTION_SCANNER) $(gtktargetlib) $(top_builddir)/gdk/Gdk-3.0.gir Makefile
Gtk_3_0_gir_SCANNERFLAGS = --warn-all --add-include-path=$(top_builddir)/gdk
Gtk_3_0_gir_SCANNERFLAGS = --strip-prefix=Gtk --add-include-path=$(top_builddir)/gdk
if USE_X11
Gtk_3_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11
endif
+1
View File
@@ -113,6 +113,7 @@
#include <gtk/gtkimmulticontext.h>
#include <gtk/gtkinfobar.h>
#include <gtk/gtkinvisible.h>
#include <gtk/gtkitem.h>
#include <gtk/gtklabel.h>
#include <gtk/gtklayout.h>
#include <gtk/gtklinkbutton.h>
+210 -46
View File
@@ -111,12 +111,22 @@ gtk_accel_map_foreach
gtk_accel_map_foreach_unfiltered
gtk_accel_map_get
gtk_accel_map_get_type G_GNUC_CONST
gtk_accel_map_load
#ifndef _WIN64
gtk_accel_map_load PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_accel_map_load_utf8
#endif
gtk_accel_map_load_fd
gtk_accel_map_load_scanner
gtk_accel_map_lock_path
gtk_accel_map_lookup_entry
gtk_accel_map_save
#ifndef _WIN64
gtk_accel_map_save PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_accel_map_save_utf8
#endif
gtk_accel_map_save_fd
gtk_accel_map_unlock_path
#endif
@@ -300,6 +310,7 @@ gtk_ui_manager_item_type_get_type G_GNUC_CONST
gtk_spin_button_update_policy_get_type G_GNUC_CONST
gtk_notebook_tab_get_type G_GNUC_CONST
gtk_number_up_layout_get_type G_GNUC_CONST
gtk_anchor_type_get_type G_GNUC_CONST
gtk_arrow_type_get_type G_GNUC_CONST
gtk_arrow_placement_get_type G_GNUC_CONST
gtk_assistant_page_type_get_type G_GNUC_CONST
@@ -359,6 +370,7 @@ gtk_print_error_get_type G_GNUC_CONST
gtk_recent_filter_flags_get_type G_GNUC_CONST
gtk_print_operation_action_get_type G_GNUC_CONST
gtk_private_flags_get_type G_GNUC_CONST
gtk_progress_bar_orientation_get_type G_GNUC_CONST
gtk_rc_flags_get_type G_GNUC_CONST
gtk_rc_token_type_get_type G_GNUC_CONST
gtk_recent_chooser_error_get_type G_GNUC_CONST
@@ -377,6 +389,8 @@ gtk_size_request_mode_get_type G_GNUC_CONST
gtk_sort_type_get_type G_GNUC_CONST
gtk_spin_type_get_type G_GNUC_CONST
gtk_state_type_get_type G_GNUC_CONST
gtk_submenu_direction_get_type G_GNUC_CONST
gtk_submenu_placement_get_type G_GNUC_CONST
gtk_target_flags_get_type G_GNUC_CONST
gtk_text_direction_get_type G_GNUC_CONST
gtk_text_buffer_target_info_get_type G_GNUC_CONST
@@ -386,6 +400,7 @@ gtk_tool_palette_drag_targets_get_type G_GNUC_CONST
gtk_tree_model_flags_get_type G_GNUC_CONST
gtk_tree_view_grid_lines_get_type G_GNUC_CONST
gtk_update_type_get_type G_GNUC_CONST
gtk_visibility_get_type G_GNUC_CONST
gtk_object_flags_get_type G_GNUC_CONST
gtk_accel_flags_get_type G_GNUC_CONST
gtk_icon_size_get_type G_GNUC_CONST
@@ -541,7 +556,6 @@ gtk_button_set_use_underline
#if IN_FILE(__GTK_CALENDAR_C__)
gtk_calendar_clear_marks
gtk_calendar_get_date
gtk_calendar_get_day_is_marked
gtk_calendar_get_detail_height_rows
gtk_calendar_get_detail_width_chars
gtk_calendar_get_display_options
@@ -908,6 +922,7 @@ gtk_dialog_add_button
gtk_dialog_add_buttons G_GNUC_NULL_TERMINATED
gtk_dialog_get_action_area
gtk_dialog_get_content_area
gtk_dialog_get_has_separator
gtk_dialog_get_widget_for_response
gtk_dialog_get_response_for_widget
gtk_dialog_get_type G_GNUC_CONST
@@ -919,6 +934,7 @@ gtk_alternative_dialog_button_order
gtk_dialog_set_alternative_button_order
gtk_dialog_set_alternative_button_order_from_array
gtk_dialog_set_default_response
gtk_dialog_set_has_separator
gtk_dialog_set_response_sensitive
#endif
#endif
@@ -993,6 +1009,8 @@ gtk_status_icon_set_has_tooltip
gtk_status_icon_get_has_tooltip
gtk_status_icon_set_visible
gtk_status_icon_get_visible
gtk_status_icon_set_blinking
gtk_status_icon_get_blinking
gtk_status_icon_is_embedded
gtk_status_icon_position_menu
gtk_status_icon_get_geometry
@@ -1225,22 +1243,47 @@ gtk_expander_set_use_underline
#if IN_HEADER(__GTK_FILE_CHOOSER_H__)
#if IN_FILE(__GTK_FILE_CHOOSER_C__)
gtk_file_chooser_add_filter
gtk_file_chooser_add_shortcut_folder
#ifndef _WIN64
gtk_file_chooser_add_shortcut_folder PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_add_shortcut_folder_utf8
#endif
gtk_file_chooser_add_shortcut_folder_uri
gtk_file_chooser_error_quark
gtk_file_chooser_get_action
gtk_file_chooser_get_current_folder
#ifndef _WIN64
gtk_file_chooser_get_current_folder PRIVATE
#endif
gtk_file_chooser_get_current_folder_file
#ifdef G_OS_WIN32
gtk_file_chooser_get_current_folder_utf8
#endif
gtk_file_chooser_get_current_folder_uri
gtk_file_chooser_get_extra_widget
gtk_file_chooser_get_file
gtk_file_chooser_get_filename
gtk_file_chooser_get_filenames
#ifndef _WIN64
gtk_file_chooser_get_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_get_filename_utf8
#endif
#ifndef _WIN64
gtk_file_chooser_get_filenames PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_get_filenames_utf8
#endif
gtk_file_chooser_get_files
gtk_file_chooser_get_filter
gtk_file_chooser_get_local_only
gtk_file_chooser_get_preview_file
gtk_file_chooser_get_preview_filename
#ifndef _WIN64
gtk_file_chooser_get_preview_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_get_preview_filename_utf8
#endif
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_widget_active
@@ -1255,23 +1298,48 @@ gtk_file_chooser_get_uri
gtk_file_chooser_get_uris
gtk_file_chooser_get_use_preview_label
gtk_file_chooser_list_filters
gtk_file_chooser_list_shortcut_folders
#ifndef _WIN64
gtk_file_chooser_list_shortcut_folders PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_list_shortcut_folders_utf8
#endif
gtk_file_chooser_list_shortcut_folder_uris
gtk_file_chooser_remove_filter
gtk_file_chooser_remove_shortcut_folder
#ifndef _WIN64
gtk_file_chooser_remove_shortcut_folder PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_remove_shortcut_folder_utf8
#endif
gtk_file_chooser_remove_shortcut_folder_uri
gtk_file_chooser_select_all
gtk_file_chooser_select_file
gtk_file_chooser_select_filename
#ifndef _WIN64
gtk_file_chooser_select_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_select_filename_utf8
#endif
gtk_file_chooser_select_uri
gtk_file_chooser_set_action
gtk_file_chooser_set_current_folder
#ifndef _WIN64
gtk_file_chooser_set_current_folder PRIVATE
#endif
gtk_file_chooser_set_current_folder_file
#ifdef G_OS_WIN32
gtk_file_chooser_set_current_folder_utf8
#endif
gtk_file_chooser_set_current_folder_uri
gtk_file_chooser_set_current_name
gtk_file_chooser_set_extra_widget
gtk_file_chooser_set_file
gtk_file_chooser_set_filename
#ifndef _WIN64
gtk_file_chooser_set_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_set_filename_utf8
#endif
gtk_file_chooser_set_filter
gtk_file_chooser_set_local_only
gtk_file_chooser_set_preview_widget
@@ -1282,7 +1350,12 @@ gtk_file_chooser_set_uri
gtk_file_chooser_set_use_preview_label
gtk_file_chooser_unselect_all
gtk_file_chooser_unselect_file
gtk_file_chooser_unselect_filename
#ifndef _WIN64
gtk_file_chooser_unselect_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_unselect_filename_utf8
#endif
gtk_file_chooser_unselect_uri
#endif
#endif
@@ -1508,7 +1581,12 @@ gtk_icon_source_copy
gtk_icon_source_free
gtk_icon_source_get_direction
gtk_icon_source_get_direction_wildcarded
gtk_icon_source_get_filename
#ifndef _WIN64
gtk_icon_source_get_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_source_get_filename_utf8
#endif
gtk_icon_source_get_icon_name
gtk_icon_source_get_pixbuf
gtk_icon_source_get_size
@@ -1519,7 +1597,12 @@ gtk_icon_source_get_type G_GNUC_CONST
gtk_icon_source_new
gtk_icon_source_set_direction
gtk_icon_source_set_direction_wildcarded
gtk_icon_source_set_filename
#ifndef _WIN64
gtk_icon_source_set_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_source_set_filename_utf8
#endif
gtk_icon_source_set_icon_name
gtk_icon_source_set_pixbuf
gtk_icon_source_set_size
@@ -1539,20 +1622,35 @@ gtk_icon_info_get_base_size
gtk_icon_info_get_builtin_pixbuf
gtk_icon_info_get_display_name
gtk_icon_info_get_embedded_rect
gtk_icon_info_get_filename
#ifndef _WIN64
gtk_icon_info_get_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_info_get_filename_utf8
#endif
gtk_icon_info_get_type G_GNUC_CONST
gtk_icon_info_load_icon
gtk_icon_info_load_symbolic
gtk_icon_info_load_symbolic_for_style
gtk_icon_info_set_raw_coordinates
gtk_icon_theme_add_builtin_icon
gtk_icon_theme_append_search_path
#ifndef _WIN64
gtk_icon_theme_append_search_path PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_theme_append_search_path_utf8
#endif
gtk_icon_theme_error_quark
gtk_icon_theme_get_default
gtk_icon_theme_get_example_icon_name
gtk_icon_theme_get_for_screen
gtk_icon_theme_get_icon_sizes
gtk_icon_theme_get_search_path
#ifndef _WIN64
gtk_icon_theme_get_search_path PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_theme_get_search_path_utf8
#endif
gtk_icon_theme_get_type G_GNUC_CONST
gtk_icon_theme_has_icon
gtk_icon_theme_list_contexts
@@ -1562,11 +1660,21 @@ gtk_icon_theme_lookup_icon
gtk_icon_theme_lookup_by_gicon
gtk_icon_theme_choose_icon
gtk_icon_theme_new
gtk_icon_theme_prepend_search_path
#ifndef _WIN64
gtk_icon_theme_prepend_search_path PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_theme_prepend_search_path_utf8
#endif
gtk_icon_theme_rescan_if_needed
gtk_icon_theme_set_custom_theme
gtk_icon_theme_set_screen
gtk_icon_theme_set_search_path
#ifndef _WIN64
gtk_icon_theme_set_search_path PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_theme_set_search_path_utf8
#endif
#endif
#endif
@@ -1580,7 +1688,7 @@ gtk_icon_view_get_item_width
gtk_icon_view_get_margin
gtk_icon_view_get_markup_column
gtk_icon_view_get_model
gtk_icon_view_get_item_orientation
gtk_icon_view_get_orientation
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_item_at_pos
gtk_icon_view_convert_widget_to_bin_window_coords
@@ -1608,7 +1716,7 @@ gtk_icon_view_set_item_width
gtk_icon_view_set_margin
gtk_icon_view_set_markup_column
gtk_icon_view_set_model
gtk_icon_view_set_item_orientation
gtk_icon_view_set_orientation
gtk_icon_view_set_pixbuf_column
gtk_icon_view_set_row_spacing
gtk_icon_view_set_selection_mode
@@ -1651,7 +1759,12 @@ gtk_image_get_storage_type
gtk_image_get_type G_GNUC_CONST
gtk_image_new
gtk_image_new_from_animation
gtk_image_new_from_file
#ifndef _WIN64
gtk_image_new_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_image_new_from_file_utf8
#endif
gtk_image_new_from_icon_name
gtk_image_new_from_icon_set
gtk_image_new_from_pixbuf
@@ -1659,7 +1772,12 @@ gtk_image_new_from_pixmap
gtk_image_new_from_stock
gtk_image_new_from_gicon
gtk_image_set_from_animation
gtk_image_set_from_file
#ifndef _WIN64
gtk_image_set_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_image_set_from_file_utf8
#endif
gtk_image_set_from_icon_name
gtk_image_set_from_icon_set
gtk_image_set_from_pixbuf
@@ -1732,6 +1850,15 @@ gtk_invisible_set_screen
#endif
#endif
#if IN_HEADER(__GTK_ITEM_H__)
#if IN_FILE(__GTK_ITEM_C__)
gtk_item_deselect
gtk_item_get_type G_GNUC_CONST
gtk_item_select
gtk_item_toggle
#endif
#endif
#if IN_HEADER(__GTK_LABEL_H__)
#if IN_FILE(__GTK_LABEL_C__)
gtk_label_get_angle
@@ -1840,8 +1967,6 @@ gtk_list_store_swap
#if IN_HEADER(__GTK_MAIN_H__)
#if IN_FILE(__GTK_MAIN_C__)
gtk_get_debug_flags
gtk_set_debug_flags
gtk_get_option_group
gtk_get_current_event
gtk_get_current_event_device
@@ -1853,11 +1978,6 @@ gtk_events_pending
gtk_disable_setlocale
gtk_distribute_natural_allocation
gtk_set_locale
gtk_get_major_version
gtk_get_minor_version
gtk_get_micro_version
gtk_get_binary_age
gtk_get_interface_age
gtk_check_version
gtk_get_default_language
gtk_get_event_widget
@@ -2560,7 +2680,7 @@ gtk_print_win32_devnames_from_printer_name
#if IN_HEADER(__GTK_PROGRESS_BAR_H__)
#if IN_FILE(__GTK_PROGRESS_BAR_C__)
gtk_progress_bar_get_fraction
gtk_progress_bar_get_inverted
gtk_progress_bar_get_orientation
gtk_progress_bar_get_pulse_step
gtk_progress_bar_get_text
gtk_progress_bar_get_ellipsize
@@ -2568,7 +2688,7 @@ gtk_progress_bar_get_type G_GNUC_CONST
gtk_progress_bar_new
gtk_progress_bar_pulse
gtk_progress_bar_set_fraction
gtk_progress_bar_set_inverted
gtk_progress_bar_set_orientation
gtk_progress_bar_set_pulse_step
gtk_progress_bar_set_text
gtk_progress_bar_set_ellipsize
@@ -2593,7 +2713,6 @@ gtk_radio_action_join_group
#if IN_FILE(__GTK_RADIO_BUTTON_C__)
gtk_radio_button_get_group
gtk_radio_button_get_type G_GNUC_CONST
gtk_radio_button_join_group
gtk_radio_button_new
gtk_radio_button_new_from_widget
gtk_radio_button_new_with_label
@@ -2666,7 +2785,12 @@ gtk_range_set_value
#if IN_HEADER(__GTK_RC_H__)
#if IN_FILE(__GTK_RC_C__)
gtk_rc_add_default_file
#ifndef _WIN64
gtk_rc_add_default_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_add_default_file_utf8
#endif
gtk_rc_find_module_in_path
gtk_rc_find_pixmap_in_path
gtk_rc_get_default_files
@@ -2676,7 +2800,12 @@ gtk_rc_get_module_dir
gtk_rc_get_style
gtk_rc_get_style_by_paths
gtk_rc_get_theme_dir
gtk_rc_parse
#ifndef _WIN64
gtk_rc_parse PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_parse_utf8
#endif
gtk_rc_parse_color
gtk_rc_parse_color_full
gtk_rc_parse_priority
@@ -2686,7 +2815,12 @@ gtk_rc_reparse_all
gtk_rc_reparse_all_for_settings
gtk_rc_reset_styles
gtk_rc_scanner_new
gtk_rc_set_default_files
#ifndef _WIN64
gtk_rc_set_default_files PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_set_default_files_utf8
#endif
gtk_rc_style_copy
gtk_rc_style_get_type G_GNUC_CONST
gtk_rc_style_new
@@ -3265,7 +3399,6 @@ gtk_text_buffer_set_text
#if IN_HEADER(__GTK_TEXT_TYPES_H__)
#if IN_FILE(__GTK_TEXT_TYPES_C__)
gtk_text_unknown_char_utf8_gtk_tests_only
gtk_text_byte_begins_utf8_char
#endif
#endif
@@ -3932,6 +4065,7 @@ gtk_tree_view_column_clicked
gtk_tree_view_column_focus_cell
gtk_tree_view_column_get_alignment
gtk_tree_view_column_get_clickable
gtk_tree_view_column_get_desired_size
gtk_tree_view_column_get_expand
gtk_tree_view_column_get_fixed_width
gtk_tree_view_column_get_max_width
@@ -4087,7 +4221,12 @@ gtk_identifier_get_type G_GNUC_CONST
#if IN_HEADER(__GTK_UI_MANAGER_H__)
#if IN_FILE(__GTK_UI_MANAGER_C__)
gtk_ui_manager_add_ui
gtk_ui_manager_add_ui_from_file
#ifndef _WIN64
gtk_ui_manager_add_ui_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_ui_manager_add_ui_from_file_utf8
#endif
gtk_ui_manager_add_ui_from_string
gtk_ui_manager_ensure_update
gtk_ui_manager_get_accel_group
@@ -4440,7 +4579,12 @@ gtk_window_set_decorated
gtk_window_set_deletable
gtk_window_set_default
gtk_window_set_default_icon
gtk_window_set_default_icon_from_file
#ifndef _WIN64
gtk_window_set_default_icon_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_window_set_default_icon_from_file_utf8
#endif
gtk_window_set_default_icon_list
gtk_window_set_default_icon_name
gtk_window_set_default_size
@@ -4453,7 +4597,12 @@ gtk_window_set_geometry_hints
gtk_window_set_gravity
gtk_window_set_has_frame
gtk_window_set_icon
gtk_window_set_icon_from_file
#ifndef _WIN64
gtk_window_set_icon_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_window_set_icon_from_file_utf8
#endif
gtk_window_set_icon_list
gtk_window_set_icon_name
gtk_window_set_keep_above
@@ -4484,7 +4633,6 @@ gtk_window_unstick
#if IN_HEADER(__GTK_WRAP_BOX_H__)
#if IN_FILE(__GTK_WRAP_BOX_C__)
gtk_wrap_allocation_mode_get_type
gtk_wrap_box_get_allocation_mode
gtk_wrap_box_get_horizontal_spacing
gtk_wrap_box_get_minimum_line_children
@@ -4492,9 +4640,8 @@ gtk_wrap_box_get_natural_line_children
gtk_wrap_box_get_spreading
gtk_wrap_box_get_type G_GNUC_CONST
gtk_wrap_box_get_vertical_spacing
gtk_wrap_box_insert_child_with_padding
gtk_wrap_box_insert_child
gtk_wrap_box_new
gtk_wrap_box_packing_get_type
gtk_wrap_box_reorder_child
gtk_wrap_box_set_allocation_mode
gtk_wrap_box_set_horizontal_spacing
@@ -4502,7 +4649,6 @@ gtk_wrap_box_set_minimum_line_children
gtk_wrap_box_set_natural_line_children
gtk_wrap_box_set_spreading
gtk_wrap_box_set_vertical_spacing
gtk_wrap_box_spreading_get_type
#endif
#endif
@@ -4532,3 +4678,21 @@ gtk_info_bar_set_message_type
gtk_info_bar_get_message_type
#endif
#endif
#ifdef INCLUDE_VARIABLES
gtk_binary_age
gtk_interface_age
gtk_major_version
gtk_minor_version
gtk_micro_version
gtk_debug_flags
gtk_text_attr_appearance_type
gtk_text_char_type
gtk_text_child_type
gtk_text_left_mark_type
gtk_text_pixbuf_type
gtk_text_right_mark_type
gtk_text_toggle_off_type
gtk_text_toggle_on_type
gtk_text_unknown_char_utf8
#endif
+6 -3
View File
@@ -631,6 +631,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
content_area = gtk_dialog_get_content_area (dialog);
action_area = gtk_dialog_get_action_area (dialog);
gtk_dialog_set_has_separator (dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
@@ -1878,9 +1879,9 @@ text_view_key_press_event (GtkWidget *text_view,
switch (event->keyval)
{
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_KP_Enter:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
gtk_text_buffer_get_insert (buffer));
@@ -2218,6 +2219,7 @@ display_credits_dialog (GtkWidget *button,
content_area = gtk_dialog_get_content_area (credits_dialog);
action_area = gtk_dialog_get_action_area (credits_dialog);
gtk_dialog_set_has_separator (credits_dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (credits_dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
@@ -2300,6 +2302,7 @@ display_license_dialog (GtkWidget *button,
content_area = gtk_dialog_get_content_area (license_dialog);
action_area = gtk_dialog_get_action_area (license_dialog);
gtk_dialog_set_has_separator (license_dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (license_dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
+13 -13
View File
@@ -963,22 +963,22 @@ gtk_accelerator_valid (guint keyval,
GdkModifierType modifiers)
{
static const guint invalid_accelerator_vals[] = {
GDK_KEY_Shift_L, GDK_KEY_Shift_R, GDK_KEY_Shift_Lock, GDK_KEY_Caps_Lock, GDK_KEY_ISO_Lock,
GDK_KEY_Control_L, GDK_KEY_Control_R, GDK_KEY_Meta_L, GDK_KEY_Meta_R,
GDK_KEY_Alt_L, GDK_KEY_Alt_R, GDK_KEY_Super_L, GDK_KEY_Super_R, GDK_KEY_Hyper_L, GDK_KEY_Hyper_R,
GDK_KEY_ISO_Level3_Shift, GDK_KEY_ISO_Next_Group, GDK_KEY_ISO_Prev_Group,
GDK_KEY_ISO_First_Group, GDK_KEY_ISO_Last_Group,
GDK_KEY_Mode_switch, GDK_KEY_Num_Lock, GDK_KEY_Multi_key,
GDK_KEY_Scroll_Lock, GDK_KEY_Sys_Req,
GDK_KEY_Tab, GDK_KEY_ISO_Left_Tab, GDK_KEY_KP_Tab,
GDK_KEY_First_Virtual_Screen, GDK_KEY_Prev_Virtual_Screen,
GDK_KEY_Next_Virtual_Screen, GDK_KEY_Last_Virtual_Screen,
GDK_KEY_Terminate_Server, GDK_KEY_AudibleBell_Enable,
GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock,
GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R,
GDK_Alt_L, GDK_Alt_R, GDK_Super_L, GDK_Super_R, GDK_Hyper_L, GDK_Hyper_R,
GDK_ISO_Level3_Shift, GDK_ISO_Next_Group, GDK_ISO_Prev_Group,
GDK_ISO_First_Group, GDK_ISO_Last_Group,
GDK_Mode_switch, GDK_Num_Lock, GDK_Multi_key,
GDK_Scroll_Lock, GDK_Sys_Req,
GDK_Tab, GDK_ISO_Left_Tab, GDK_KP_Tab,
GDK_First_Virtual_Screen, GDK_Prev_Virtual_Screen,
GDK_Next_Virtual_Screen, GDK_Last_Virtual_Screen,
GDK_Terminate_Server, GDK_AudibleBell_Enable,
0
};
static const guint invalid_unmodified_vals[] = {
GDK_KEY_Up, GDK_KEY_Down, GDK_KEY_Left, GDK_KEY_Right,
GDK_KEY_KP_Up, GDK_KEY_KP_Down, GDK_KEY_KP_Left, GDK_KEY_KP_Right,
GDK_Up, GDK_Down, GDK_Left, GDK_Right,
GDK_KP_Up, GDK_KP_Down, GDK_KP_Left, GDK_KP_Right,
0
};
const guint *ac_val;
+28
View File
@@ -1003,3 +1003,31 @@ do_accel_map_changed (AccelEntry *entry)
entry->accel_key,
entry->accel_mods);
}
#if defined (G_OS_WIN32) && !defined (_WIN64)
#undef gtk_accel_map_load
void
gtk_accel_map_load (const gchar *file_name)
{
gchar *utf8_file_name = g_locale_to_utf8 (file_name, -1, NULL, NULL, NULL);
gtk_accel_map_load_utf8 (utf8_file_name);
g_free (utf8_file_name);
}
#undef gtk_accel_map_save
void
gtk_accel_map_save (const gchar *file_name)
{
gchar *utf8_file_name = g_locale_to_utf8 (file_name, -1, NULL, NULL, NULL);
gtk_accel_map_save_utf8 (utf8_file_name);
g_free (utf8_file_name);
}
#endif
+6
View File
@@ -50,6 +50,12 @@ typedef void (*GtkAccelMapForeach) (gpointer data,
/* --- public API --- */
#ifdef G_OS_WIN32
/* Reserve old names for DLL ABI backward compatibility */
#define gtk_accel_map_load gtk_accel_map_load_utf8
#define gtk_accel_map_save gtk_accel_map_save_utf8
#endif
void gtk_accel_map_add_entry (const gchar *accel_path,
guint accel_key,
GdkModifierType accel_mods);
+15 -64
View File
@@ -47,7 +47,6 @@
#include "config.h"
#include <math.h>
#include "gtkarrow.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -77,17 +76,8 @@ static void gtk_arrow_get_property (GObject *object,
static gboolean gtk_arrow_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_arrow_size_request_init (GtkSizeRequestIface *iface);
static void gtk_arrow_get_width (GtkSizeRequest *widget,
gint *minimum_size,
gint *natural_size);
static void gtk_arrow_get_height (GtkSizeRequest *widget,
gint *minimum_size,
gint *natural_size);
G_DEFINE_TYPE_WITH_CODE (GtkArrow, gtk_arrow, GTK_TYPE_MISC,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SIZE_REQUEST,
gtk_arrow_size_request_init))
G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
static void
@@ -186,6 +176,7 @@ static void
gtk_arrow_init (GtkArrow *arrow)
{
GtkArrowPrivate *priv;
gint xpad, ypad;
arrow->priv = G_TYPE_INSTANCE_GET_PRIVATE (arrow,
GTK_TYPE_ARROW,
@@ -194,50 +185,14 @@ gtk_arrow_init (GtkArrow *arrow)
gtk_widget_set_has_window (GTK_WIDGET (arrow), FALSE);
gtk_misc_get_padding (GTK_MISC (arrow), &xpad, &ypad);
GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + xpad * 2;
GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + ypad * 2;
priv->arrow_type = GTK_ARROW_RIGHT;
priv->shadow_type = GTK_SHADOW_OUT;
}
static void
gtk_arrow_size_request_init (GtkSizeRequestIface *iface)
{
iface->get_width = gtk_arrow_get_width;
iface->get_height = gtk_arrow_get_height;
}
static void
gtk_arrow_get_width (GtkSizeRequest *widget,
gint *minimum_size,
gint *natural_size)
{
gint xpad;
gtk_misc_get_padding (GTK_MISC (widget), &xpad, NULL);
if (minimum_size)
*minimum_size = MIN_ARROW_SIZE + xpad * 2;
if (natural_size)
*natural_size = MIN_ARROW_SIZE + xpad * 2;
}
static void
gtk_arrow_get_height (GtkSizeRequest *widget,
gint *minimum_size,
gint *natural_size)
{
gint ypad;
gtk_misc_get_padding (GTK_MISC (widget), NULL, &ypad);
if (minimum_size)
*minimum_size = MIN_ARROW_SIZE + ypad * 2;
if (natural_size)
*natural_size = MIN_ARROW_SIZE + ypad * 2;
}
/**
* gtk_arrow_new:
* @arrow_type: a valid #GtkArrowType.
@@ -318,10 +273,8 @@ gtk_arrow_expose (GtkWidget *widget,
{
GtkArrow *arrow = GTK_ARROW (widget);
GtkArrowPrivate *priv = arrow->priv;
GtkAllocation allocation;
GtkMisc *misc = GTK_MISC (widget);
GtkShadowType shadow_type;
GtkStateType state;
gint width, height;
gint x, y;
gint extent;
@@ -332,12 +285,11 @@ gtk_arrow_expose (GtkWidget *widget,
gtk_widget_style_get (widget, "arrow-scaling", &arrow_scaling, NULL);
gtk_widget_get_allocation (widget, &allocation);
gtk_misc_get_padding (misc, &xpad, &ypad);
gtk_misc_get_alignment (misc, &xalign, &yalign);
width = allocation.width - xpad * 2;
height = allocation.height - ypad * 2;
width = widget->allocation.width - xpad * 2;
height = widget->allocation.height - ypad * 2;
extent = MIN (width, height) * arrow_scaling;
effective_arrow_type = priv->arrow_type;
@@ -350,14 +302,14 @@ gtk_arrow_expose (GtkWidget *widget,
effective_arrow_type = GTK_ARROW_LEFT;
}
x = floor (allocation.x + xpad + ((allocation.width - extent) * xalign));
y = floor (allocation.y + ypad + ((allocation.height - extent) * yalign));
x = floor (widget->allocation.x + xpad
+ ((widget->allocation.width - extent) * xalign));
y = floor (widget->allocation.y + ypad
+ ((widget->allocation.height - extent) * yalign));
shadow_type = priv->shadow_type;
state = gtk_widget_get_state (widget);
if (state == GTK_STATE_ACTIVE)
if (widget->state == GTK_STATE_ACTIVE)
{
if (shadow_type == GTK_SHADOW_IN)
shadow_type = GTK_SHADOW_OUT;
@@ -369,9 +321,8 @@ gtk_arrow_expose (GtkWidget *widget,
shadow_type = GTK_SHADOW_ETCHED_IN;
}
gtk_paint_arrow (gtk_widget_get_style (widget),
gtk_widget_get_window (widget),
state, shadow_type,
gtk_paint_arrow (widget->style, widget->window,
widget->state, shadow_type,
&event->area, widget, "arrow",
effective_arrow_type, TRUE,
x, y, extent, extent);
+16 -8
View File
@@ -30,18 +30,26 @@
* @Title: GtkButtonBox
* @See_also: #GtkVButtonBox, #GtkHButtonBox
*
* The primary purpose of this class is to keep track of the various
* properties of #GtkHButtonBox and #GtkVButtonBox widgets.
* The primary purpose of this class is to keep track of the various properties
* of #GtkHButtonBox and #GtkVButtonBox widgets.
*
* gtk_button_box_get_child_size() retrieves the minimum width and height
* for widgets in a given button box.
*
* The internal padding of buttons can be retrieved and changed per button box
* using gtk_button_box_get_child_ipadding() and
* gtk_button_box_set_child_ipadding() respectively.
*
* gtk_button_box_get_spacing() and gtk_button_box_set_spacing() retrieve and
* change default number of pixels between buttons, respectively.
*
* gtk_button_box_get_layout() and gtk_button_box_set_layout() retrieve and
* alter the method used to spread the buttons in a button box across the
* container, respectively.
*
* The main purpose of GtkButtonBox is to make sure the children have all the
* same size. GtkButtonBox gives all children the same size, but it does allow
* 'outliers' to keep their own larger size. To force all children to be
* strictly the same size without exceptions, you can set the
* #GtkButtonBox::homogeneous property to %TRUE.
* same size. Therefore it ignores the homogeneous property which it inherited
* from GtkBox, and always behaves as if homogeneous was %TRUE.
*/
#include "config.h"
@@ -164,7 +172,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
PROP_LAYOUT_STYLE,
g_param_spec_enum ("layout-style",
P_("Layout style"),
P_("How to lay out the buttons in the box. Possible values are: spread, edge, start and end"),
P_("How to layout the buttons in the box. Possible values are spread, edge, start and end"),
GTK_TYPE_BUTTON_BOX_STYLE,
DEFAULT_LAYOUT_STYLE,
GTK_PARAM_READWRITE));
@@ -315,7 +323,7 @@ gtk_button_box_set_layout (GtkButtonBox *widget,
*
* Retrieves the method being used to arrange the buttons in a button box.
*
* Returns: the method used to lay out buttons in @widget.
* Returns: the method used to layout buttons in @widget.
*/
GtkButtonBoxStyle
gtk_button_box_get_layout (GtkButtonBox *widget)
+3 -8
View File
@@ -214,15 +214,10 @@ get_child_padding_delta (GtkBin *bin,
gint *delta_v)
{
GtkBinPrivate *priv = bin->priv;
gint hmin, vmin, hnat, vnat, child_hmin, child_vmin;
gint hmin, vmin, child_hmin, child_vmin;
/* we can't use gtk_size_request_get_width() wrapper because we want
* our "original" request, not any external adjustments from
* set_size_request() or whatever. we have to ask for natural also
* because NULL isn't allowed for the direct vfuncs
*/
GTK_SIZE_REQUEST_GET_IFACE (bin)->get_width(GTK_SIZE_REQUEST (bin), &hmin, &hnat);
GTK_SIZE_REQUEST_GET_IFACE (bin)->get_height (GTK_SIZE_REQUEST (bin), &vmin, &vnat);
gtk_size_request_get_width (GTK_SIZE_REQUEST (bin), &hmin, NULL);
gtk_size_request_get_height (GTK_SIZE_REQUEST (bin), &vmin, NULL);
gtk_size_request_get_width (GTK_SIZE_REQUEST (priv->child), &child_hmin, NULL);
gtk_size_request_get_height (GTK_SIZE_REQUEST (priv->child), &child_vmin, NULL);
+2 -2
View File
@@ -131,8 +131,8 @@ binding_key_hash_insert_entry (GtkKeyHash *key_hash,
*/
if (entry->modifiers & GDK_SHIFT_MASK)
{
if (keyval == GDK_KEY_Tab)
keyval = GDK_KEY_ISO_Left_Tab;
if (keyval == GDK_Tab)
keyval = GDK_ISO_Left_Tab;
else
keyval = gdk_keyval_to_upper (keyval);
}
+3 -3
View File
@@ -701,7 +701,7 @@ _gtk_builder_construct (GtkBuilder *builder,
g_object_set_property (obj, param->name, &param->value);
#if G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER)
if (gtk_debug_flags & GTK_DEBUG_BUILDER)
{
gchar *str = g_strdup_value_contents ((const GValue*)&param->value);
g_print ("set %s: %s = %s\n", info->id, param->name, str);
@@ -1028,7 +1028,7 @@ gtk_builder_add_from_string (GtkBuilder *builder,
* @builder: a #GtkBuilder
* @buffer: the string to parse
* @length: the length of @buffer (may be -1 if @buffer is nul-terminated)
* @object_ids: (array zero-teminated=1) (element-type utf8): nul-terminated array of objects to build
* @object_ids: nul-terminated array of objects to build
* @error: (allow-none): return location for an error, or %NULL
*
* Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
@@ -1279,7 +1279,7 @@ gtk_builder_connect_signals (GtkBuilder *builder,
/**
* gtk_builder_connect_signals_full:
* @builder: a #GtkBuilder
* @func: (scope call): the function used to connect the signals
* @func: the function used to connect the signals
* @user_data: arbitrary data that will be passed to the connection function
*
* This function can be thought of the interpreted language binding
+1 -1
View File
@@ -835,7 +835,7 @@ start_element (GMarkupParseContext *context,
ParserData *data = (ParserData*)user_data;
#ifdef GTK_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER)
if (gtk_debug_flags & GTK_DEBUG_BUILDER)
{
GString *tags = g_string_new ("");
int i;
+29 -19
View File
@@ -227,7 +227,6 @@ gtk_button_class_init (GtkButtonClass *klass)
container_class->child_type = gtk_button_child_type;
container_class->add = gtk_button_add;
gtk_container_class_handle_border_width (container_class);
klass->pressed = gtk_real_button_pressed;
klass->released = gtk_real_button_released;
@@ -1285,16 +1284,19 @@ gtk_button_realize (GtkWidget *widget)
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
gint border_width;
gtk_widget_get_allocation (widget, &allocation);
gtk_widget_set_realized (widget, TRUE);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.x = allocation.x + border_width;
attributes.y = allocation.y + border_width;
attributes.width = allocation.width - border_width * 2;
attributes.height = allocation.height - border_width * 2;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
@@ -1453,6 +1455,7 @@ gtk_button_size_allocate (GtkWidget *widget,
GtkStyle *style;
GtkWidget *child;
guint border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gint xthickness, ythickness;
GtkBorder default_border;
GtkBorder inner_border;
@@ -1473,28 +1476,30 @@ gtk_button_size_allocate (GtkWidget *widget,
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (button->event_window,
allocation->x,
allocation->y,
allocation->width,
allocation->height);
allocation->x + border_width,
allocation->y + border_width,
allocation->width - border_width * 2,
allocation->height - border_width * 2);
child = gtk_bin_get_child (GTK_BIN (button));
if (child && gtk_widget_get_visible (child))
{
child_allocation.x = allocation->x + inner_border.left + xthickness;
child_allocation.y = allocation->y + inner_border.top + ythickness;
child_allocation.x = allocation->x + border_width + inner_border.left + xthickness;
child_allocation.y = allocation->y + border_width + inner_border.top + ythickness;
child_allocation.width =
allocation->width -
xthickness * 2 -
inner_border.left -
inner_border.right;
inner_border.right -
border_width * 2;
child_allocation.height =
allocation->height -
ythickness * 2 -
inner_border.top -
inner_border.bottom;
inner_border.bottom -
border_width * 2;
if (gtk_widget_get_can_default (GTK_WIDGET (button)))
{
@@ -1543,6 +1548,7 @@ _gtk_button_paint (GtkButton *button,
GtkWidget *widget;
gint width, height;
gint x, y;
gint border_width;
GtkBorder default_border;
GtkBorder default_outside_border;
gboolean interior_focus;
@@ -1557,6 +1563,8 @@ _gtk_button_paint (GtkButton *button,
GdkWindow *window;
GtkStyle *style;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_button_get_props (button, &default_border, &default_outside_border, NULL, &interior_focus);
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
@@ -1567,10 +1575,10 @@ _gtk_button_paint (GtkButton *button,
style = gtk_widget_get_style (widget);
window = gtk_widget_get_window (widget);
x = allocation.x;
y = allocation.y;
width = allocation.width;
height = allocation.height;
x = allocation.x + border_width;
y = allocation.y + border_width;
width = allocation.width - border_width * 2;
height = allocation.height - border_width * 2;
if (gtk_widget_has_default (widget) &&
GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL)
@@ -1917,6 +1925,7 @@ gtk_button_get_size (GtkSizeRequest *widget,
gint focus_width;
gint focus_pad;
gint minimum, natural;
guint border_width;
gtk_button_get_props (button, &default_border, NULL, &inner_border, NULL);
gtk_widget_style_get (GTK_WIDGET (widget),
@@ -1924,11 +1933,12 @@ gtk_button_get_size (GtkSizeRequest *widget,
"focus-padding", &focus_pad,
NULL);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
style = gtk_widget_get_style (GTK_WIDGET (widget));
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
minimum = (style->xthickness * 2 +
minimum = ((border_width + style->xthickness) * 2 +
inner_border.left + inner_border.right);
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
@@ -1936,7 +1946,7 @@ gtk_button_get_size (GtkSizeRequest *widget,
}
else
{
minimum = (style->ythickness * 2 +
minimum = ((border_width + style->ythickness) * 2 +
inner_border.top + inner_border.bottom);
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
+16 -39
View File
@@ -3367,8 +3367,8 @@ gtk_calendar_key_press (GtkWidget *widget,
switch (event->keyval)
{
case GDK_KEY_KP_Left:
case GDK_KEY_Left:
case GDK_KP_Left:
case GDK_Left:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
calendar_set_month_prev (calendar);
@@ -3380,8 +3380,8 @@ gtk_calendar_key_press (GtkWidget *widget,
priv->focus_col);
}
break;
case GDK_KEY_KP_Right:
case GDK_KEY_Right:
case GDK_KP_Right:
case GDK_Right:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
calendar_set_month_next (calendar);
@@ -3393,8 +3393,8 @@ gtk_calendar_key_press (GtkWidget *widget,
priv->focus_col);
}
break;
case GDK_KEY_KP_Up:
case GDK_KEY_Up:
case GDK_KP_Up:
case GDK_Up:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
calendar_set_year_prev (calendar);
@@ -3411,8 +3411,8 @@ gtk_calendar_key_press (GtkWidget *widget,
priv->focus_col);
}
break;
case GDK_KEY_KP_Down:
case GDK_KEY_Down:
case GDK_KP_Down:
case GDK_Down:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
calendar_set_year_next (calendar);
@@ -3427,8 +3427,8 @@ gtk_calendar_key_press (GtkWidget *widget,
priv->focus_col);
}
break;
case GDK_KEY_KP_Space:
case GDK_KEY_space:
case GDK_KP_Space:
case GDK_space:
row = priv->focus_row;
col = priv->focus_col;
@@ -3875,16 +3875,20 @@ gtk_calendar_set_display_options (GtkCalendar *calendar,
}
}
if ((flags ^ priv->display_flags) & GTK_CALENDAR_WEEK_START_MONDAY)
g_warning ("GTK_CALENDAR_WEEK_START_MONDAY is ignored; the first day of the week is determined from the locale");
if ((flags ^ priv->display_flags) & GTK_CALENDAR_SHOW_DETAILS)
resize++;
priv->display_flags = flags;
if (resize)
gtk_widget_queue_resize (GTK_WIDGET (calendar));
}
}
else
priv->display_flags = flags;
g_object_freeze_notify (G_OBJECT (calendar));
if ((old_flags ^ priv->display_flags) & GTK_CALENDAR_SHOW_HEADING)
g_object_notify (G_OBJECT (calendar), "show-heading");
@@ -4029,33 +4033,6 @@ gtk_calendar_mark_day (GtkCalendar *calendar,
}
}
/**
* gtk_calendar_get_day_is_marked:
* @calendar: a #GtkCalendar
* @day: the day number between 1 and 31.
*
* Returns if the @day of the @calendar is already marked.
*
* Returns: whether the day is marked.
*
* Since: 3.0
*/
gboolean
gtk_calendar_get_day_is_marked (GtkCalendar *calendar,
guint day)
{
GtkCalendarPrivate *priv;
g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE);
priv = calendar->priv;
if (day >= 1 && day <= 31)
return priv->marked_date[day - 1];
return FALSE;
}
/**
* gtk_calendar_unmark_day:
* @calendar: a #GtkCalendar.
+3 -3
View File
@@ -59,6 +59,8 @@ typedef struct _GtkCalendarPrivate GtkCalendarPrivate;
* @GTK_CALENDAR_NO_MONTH_CHANGE: Prevents the user from switching months with the calendar.
* @GTK_CALENDAR_SHOW_WEEK_NUMBERS: Displays each week numbers of the current year, down the
* left side of the calendar.
* @GTK_CALENDAR_WEEK_START_MONDAY: Since GTK+ 2.4, this option is deprecated and ignored by GTK+.
* The information on which day the calendar week starts is derived from the locale.
* @GTK_CALENDAR_SHOW_DETAILS: Just show an indicator, not the full details
* text when details are provided. See gtk_calendar_set_detail_func().
*
@@ -70,6 +72,7 @@ typedef enum
GTK_CALENDAR_SHOW_DAY_NAMES = 1 << 1,
GTK_CALENDAR_NO_MONTH_CHANGE = 1 << 2,
GTK_CALENDAR_SHOW_WEEK_NUMBERS = 1 << 3,
GTK_CALENDAR_WEEK_START_MONDAY = 1 << 4,
GTK_CALENDAR_SHOW_DETAILS = 1 << 5
} GtkCalendarDisplayOptions;
@@ -157,9 +160,6 @@ void gtk_calendar_set_detail_height_rows (GtkCalendar *calendar,
gint gtk_calendar_get_detail_width_chars (GtkCalendar *calendar);
gint gtk_calendar_get_detail_height_rows (GtkCalendar *calendar);
gboolean gtk_calendar_get_day_is_marked (GtkCalendar *calendar,
guint day);
G_END_DECLS
#endif /* __GTK_CALENDAR_H__ */
+4 -4
View File
@@ -454,8 +454,8 @@ grab_key_callback (GtkWidget *widget,
NULL, NULL, NULL, &consumed_modifiers);
accel_key = gdk_keyval_to_lower (event->keyval);
if (accel_key == GDK_KEY_ISO_Left_Tab)
accel_key = GDK_KEY_Tab;
if (accel_key == GDK_ISO_Left_Tab)
accel_key = GDK_Tab;
accel_mods = event->state & gtk_accelerator_get_default_mod_mask ();
@@ -473,9 +473,9 @@ grab_key_callback (GtkWidget *widget,
{
switch (event->keyval)
{
case GDK_KEY_Escape:
case GDK_Escape:
goto out; /* cancel */
case GDK_KEY_BackSpace:
case GDK_BackSpace:
/* clear the accelerator on Backspace */
cleared = TRUE;
goto out;
+33 -33
View File
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include "gtkcellrendererprogress.h"
#include "gtkorientable.h"
#include "gtkprogressbar.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -42,9 +42,8 @@ enum
PROP_PULSE,
PROP_TEXT_XALIGN,
PROP_TEXT_YALIGN,
PROP_ORIENTATION,
PROP_INVERTED
};
PROP_ORIENTATION
};
struct _GtkCellRendererProgressPrivate
{
@@ -57,8 +56,7 @@ struct _GtkCellRendererProgressPrivate
gint offset;
gfloat text_xalign;
gfloat text_yalign;
GtkOrientation orientation;
gboolean inverted;
GtkProgressBarOrientation orientation;
};
static void gtk_cell_renderer_progress_finalize (GObject *object);
@@ -97,8 +95,7 @@ static void gtk_cell_renderer_progress_render (GtkCellRenderer *ce
guint flags);
G_DEFINE_TYPE_WITH_CODE (GtkCellRendererProgress, gtk_cell_renderer_progress, GTK_TYPE_CELL_RENDERER,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
G_DEFINE_TYPE (GtkCellRendererProgress, gtk_cell_renderer_progress, GTK_TYPE_CELL_RENDERER)
static void
gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
@@ -115,9 +112,9 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
/**
* GtkCellRendererProgress:value:
*
*
* The "value" property determines the percentage to which the
* progress bar will be "filled in".
* progress bar will be "filled in".
*
* Since: 2.6
**/
@@ -205,17 +202,24 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE));
g_object_class_override_property (object_class,
PROP_ORIENTATION,
"orientation");
/**
* GtkCellRendererProgress:orientation:
*
* The "orientation" property controls the direction and growth
* direction of the progress bar (left-to-right, right-to-left,
* top-to-bottom or bottom-to-top).
*
* Since: 2.12
*/
g_object_class_install_property (object_class,
PROP_INVERTED,
g_param_spec_boolean ("inverted",
P_("Inverted"),
P_("Invert the direction in which the progress bar grows"),
FALSE,
GTK_PARAM_READWRITE));
PROP_ORIENTATION,
g_param_spec_enum ("orientation",
P_("Orientation"),
P_("Orientation and growth direction of the progress bar"),
GTK_TYPE_PROGRESS_BAR_ORIENTATION,
GTK_PROGRESS_LEFT_TO_RIGHT,
GTK_PARAM_READWRITE));
g_type_class_add_private (object_class,
sizeof (GtkCellRendererProgressPrivate));
@@ -242,8 +246,7 @@ gtk_cell_renderer_progress_init (GtkCellRendererProgress *cellprogress)
priv->text_xalign = 0.5;
priv->text_yalign = 0.5;
priv->orientation = GTK_ORIENTATION_HORIZONTAL,
priv->inverted = FALSE;
priv->orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
}
@@ -303,9 +306,6 @@ gtk_cell_renderer_progress_get_property (GObject *object,
case PROP_ORIENTATION:
g_value_set_enum (value, priv->orientation);
break;
case PROP_INVERTED:
g_value_set_boolean (value, priv->inverted);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
}
@@ -343,9 +343,6 @@ gtk_cell_renderer_progress_set_property (GObject *object,
case PROP_ORIENTATION:
priv->orientation = g_value_get_enum (value);
break;
case PROP_INVERTED:
priv->orientation = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
}
@@ -565,7 +562,8 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
NULL, widget, NULL,
x, y, w, h);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
{
clip.y = y;
clip.height = h;
@@ -575,7 +573,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
bar_size = get_bar_size (priv->pulse, priv->value, full_size);
if (!priv->inverted)
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
bar_position = get_bar_position (start, full_size, bar_size,
priv->pulse, priv->offset, is_rtl);
else
@@ -595,7 +593,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
bar_size = get_bar_size (priv->pulse, priv->value, full_size);
if (priv->inverted)
if (priv->orientation == GTK_PROGRESS_BOTTOM_TO_TOP)
bar_position = get_bar_position (start, full_size, bar_size,
priv->pulse, priv->offset, TRUE);
else
@@ -639,7 +637,8 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
if (bar_position > start)
{
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
{
clip.x = x;
clip.width = bar_position - x;
@@ -659,7 +658,8 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
if (bar_position + bar_size < start + full_size)
{
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
{
clip.x = bar_position + bar_size;
clip.width = x + w - (bar_position + bar_size);
+2 -2
View File
@@ -259,12 +259,12 @@ gtk_cell_renderer_spin_key_press_event (GtkWidget *widget,
{
if (event->state == 0)
{
if (event->keyval == GDK_KEY_Up)
if (event->keyval == GDK_Up)
{
gtk_spin_button_spin (GTK_SPIN_BUTTON (widget), GTK_SPIN_STEP_FORWARD, 1);
return TRUE;
}
else if (event->keyval == GDK_KEY_Down)
else if (event->keyval == GDK_Down)
{
gtk_spin_button_spin (GTK_SPIN_BUTTON (widget), GTK_SPIN_STEP_BACKWARD, 1);
return TRUE;
+65 -65
View File
@@ -111,7 +111,7 @@ enum {
};
struct _GtkColorSelectionPrivate
struct _ColorSelectionPrivate
{
guint has_opacity : 1;
guint has_palette : 1;
@@ -188,7 +188,7 @@ static void default_change_palette_func (GdkScreen *screen,
static void make_control_relations (AtkObject *atk_obj,
GtkWidget *widget);
static void make_all_relations (AtkObject *atk_obj,
GtkColorSelectionPrivate *priv);
ColorSelectionPrivate *priv);
static void hsv_changed (GtkWidget *hsv,
gpointer data);
@@ -326,7 +326,7 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
default_colors,
GTK_PARAM_READWRITE));
g_type_class_add_private (gobject_class, sizeof (GtkColorSelectionPrivate));
g_type_class_add_private (gobject_class, sizeof (ColorSelectionPrivate));
}
static void
@@ -338,13 +338,13 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
GtkAdjustment *adjust;
GtkWidget *picker_image;
gint i, j;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
AtkObject *atk_obj;
GList *focus_chain = NULL;
gtk_widget_push_composite_child ();
priv = colorsel->private_data = G_TYPE_INSTANCE_GET_PRIVATE (colorsel, GTK_TYPE_COLOR_SELECTION, GtkColorSelectionPrivate);
priv = colorsel->private_data = G_TYPE_INSTANCE_GET_PRIVATE (colorsel, GTK_TYPE_COLOR_SELECTION, ColorSelectionPrivate);
priv->changing = FALSE;
priv->default_set = FALSE;
priv->default_alpha_set = FALSE;
@@ -587,7 +587,7 @@ static void
gtk_color_selection_destroy (GtkObject *object)
{
GtkColorSelection *cselection = GTK_COLOR_SELECTION (object);
GtkColorSelectionPrivate *priv = cselection->private_data;
ColorSelectionPrivate *priv = cselection->private_data;
if (priv->dropper_grab_widget)
{
@@ -604,7 +604,7 @@ static void
gtk_color_selection_realize (GtkWidget *widget)
{
GtkColorSelection *colorsel = GTK_COLOR_SELECTION (widget);
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
GtkSettings *settings = gtk_widget_get_settings (widget);
priv->settings_connection = g_signal_connect (settings,
@@ -620,7 +620,7 @@ static void
gtk_color_selection_unrealize (GtkWidget *widget)
{
GtkColorSelection *colorsel = GTK_COLOR_SELECTION (widget);
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
GtkSettings *settings = gtk_widget_get_settings (widget);
g_signal_handler_disconnect (settings, priv->settings_connection);
@@ -660,7 +660,7 @@ static void
set_color_internal (GtkColorSelection *colorsel,
gdouble *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gint i;
priv = colorsel->private_data;
@@ -711,7 +711,7 @@ color_sample_drag_begin (GtkWidget *widget,
gpointer data)
{
GtkColorSelection *colorsel = data;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gdouble *colsrc;
priv = colorsel->private_data;
@@ -743,7 +743,7 @@ color_sample_drop_handle (GtkWidget *widget,
gpointer data)
{
GtkColorSelection *colorsel = data;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
guint16 *vals;
gdouble color[4];
priv = colorsel->private_data;
@@ -789,7 +789,7 @@ color_sample_drag_handle (GtkWidget *widget,
gpointer data)
{
GtkColorSelection *colorsel = data;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
guint16 vals[4];
gdouble *colsrc;
@@ -817,7 +817,7 @@ color_sample_draw_sample (GtkColorSelection *colorsel, int which)
GtkAllocation allocation;
GtkWidget *da;
gint x, y, wid, heig, goff;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
cairo_t *cr;
g_return_if_fail (colorsel != NULL);
@@ -894,7 +894,7 @@ color_sample_draw_sample (GtkColorSelection *colorsel, int which)
static void
color_sample_update_samples (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
gtk_widget_queue_draw (priv->old_sample);
gtk_widget_queue_draw (priv->cur_sample);
}
@@ -924,7 +924,7 @@ color_sample_setup_dnd (GtkColorSelection *colorsel, GtkWidget *sample)
static const GtkTargetEntry targets[] = {
{ "application/x-color", 0 }
};
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
gtk_drag_source_set (sample,
@@ -962,7 +962,7 @@ color_sample_setup_dnd (GtkColorSelection *colorsel, GtkWidget *sample)
static void
update_tooltips (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
@@ -987,7 +987,7 @@ update_tooltips (GtkColorSelection *colorsel)
static void
color_sample_new (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
@@ -1224,7 +1224,7 @@ palette_change_color (GtkWidget *drawing_area,
gdouble *color)
{
gint x, y;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
GdkColor gdk_color;
GdkColor *current_colors;
GdkScreen *screen;
@@ -1376,7 +1376,7 @@ save_color_selected (GtkWidget *menuitem,
{
GtkColorSelection *colorsel;
GtkWidget *drawing_area;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
drawing_area = GTK_WIDGET (data);
@@ -1527,11 +1527,11 @@ palette_activate (GtkWidget *widget,
gpointer data)
{
/* should have a drawing area subclass with an activate signal */
if ((event->keyval == GDK_KEY_space) ||
(event->keyval == GDK_KEY_Return) ||
(event->keyval == GDK_KEY_ISO_Enter) ||
(event->keyval == GDK_KEY_KP_Enter) ||
(event->keyval == GDK_KEY_KP_Space))
if ((event->keyval == GDK_space) ||
(event->keyval == GDK_Return) ||
(event->keyval == GDK_ISO_Enter) ||
(event->keyval == GDK_KP_Enter) ||
(event->keyval == GDK_KP_Space))
{
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "color_set")) != 0)
{
@@ -1560,7 +1560,7 @@ static GtkWidget*
palette_new (GtkColorSelection *colorsel)
{
GtkWidget *retval;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
static const GtkTargetEntry targets[] = {
{ "application/x-color", 0 }
@@ -1687,7 +1687,7 @@ grab_color_at_pointer (GdkScreen *screen,
GdkPixbuf *pixbuf;
guchar *pixels;
GtkColorSelection *colorsel = data;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
GdkColor color;
GdkWindow *root_window = gdk_screen_get_root_window (screen);
@@ -1735,7 +1735,7 @@ static void
shutdown_eyedropper (GtkWidget *widget)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
colorsel = GTK_COLOR_SELECTION (widget);
priv = colorsel->private_data;
@@ -1811,15 +1811,15 @@ key_press (GtkWidget *invisible,
switch (event->keyval)
{
case GDK_KEY_space:
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
grab_color_at_pointer (screen, pointer_device, x, y, data);
/* fall through */
case GDK_KEY_Escape:
case GDK_Escape:
shutdown_eyedropper (data);
g_signal_handlers_disconnect_by_func (invisible,
@@ -1832,23 +1832,23 @@ key_press (GtkWidget *invisible,
return TRUE;
#if defined GDK_WINDOWING_X11 || defined GDK_WINDOWING_WIN32
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
case GDK_Up:
case GDK_KP_Up:
dy = state == GDK_MOD1_MASK ? -BIG_STEP : -1;
break;
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
case GDK_Down:
case GDK_KP_Down:
dy = state == GDK_MOD1_MASK ? BIG_STEP : 1;
break;
case GDK_KEY_Left:
case GDK_KEY_KP_Left:
case GDK_Left:
case GDK_KP_Left:
dx = state == GDK_MOD1_MASK ? -BIG_STEP : -1;
break;
case GDK_KEY_Right:
case GDK_KEY_KP_Right:
case GDK_Right:
case GDK_KP_Right:
dx = state == GDK_MOD1_MASK ? BIG_STEP : 1;
break;
#endif
@@ -1896,7 +1896,7 @@ static void
get_screen_color (GtkWidget *button)
{
GtkColorSelection *colorsel = g_object_get_data (G_OBJECT (button), "COLORSEL");
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (button));
GdkDevice *device, *keyb_device, *pointer_device;
GdkCursor *picker_cursor;
@@ -1987,7 +1987,7 @@ hex_changed (GtkWidget *hex_entry,
gpointer data)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
GdkColor color;
gchar *text;
@@ -2029,7 +2029,7 @@ hsv_changed (GtkWidget *hsv,
gpointer data)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
colorsel = GTK_COLOR_SELECTION (data);
priv = colorsel->private_data;
@@ -2055,7 +2055,7 @@ adjustment_changed (GtkAdjustment *adjustment,
gpointer data)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
colorsel = GTK_COLOR_SELECTION (g_object_get_data (G_OBJECT (adjustment), "COLORSEL"));
priv = colorsel->private_data;
@@ -2108,7 +2108,7 @@ opacity_entry_changed (GtkWidget *opacity_entry,
gpointer data)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
GtkAdjustment *adj;
gchar *text;
@@ -2176,7 +2176,7 @@ make_palette_frame (GtkColorSelection *colorsel,
gint j)
{
GtkWidget *frame;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
frame = gtk_frame_new (NULL);
@@ -2191,7 +2191,7 @@ make_palette_frame (GtkColorSelection *colorsel,
static void
set_selected_palette (GtkColorSelection *colorsel, int x, int y)
{
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
gtk_widget_grab_focus (priv->custom_palette[x][y]);
}
@@ -2208,7 +2208,7 @@ scale_round (double val, double factor)
static void
update_color (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv = colorsel->private_data;
ColorSelectionPrivate *priv = colorsel->private_data;
gchar entryval[12];
gchar opacity_text[32];
gchar *ptr;
@@ -2336,7 +2336,7 @@ GtkWidget *
gtk_color_selection_new (void)
{
GtkColorSelection *colorsel;
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gdouble color[4];
color[0] = 1.0;
color[1] = 1.0;
@@ -2367,7 +2367,7 @@ gtk_color_selection_new (void)
gboolean
gtk_color_selection_get_has_opacity_control (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE);
@@ -2388,7 +2388,7 @@ void
gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel,
gboolean has_opacity)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
@@ -2427,7 +2427,7 @@ gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel,
gboolean
gtk_color_selection_get_has_palette (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE);
@@ -2448,7 +2448,7 @@ void
gtk_color_selection_set_has_palette (GtkColorSelection *colorsel,
gboolean has_palette)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
priv = colorsel->private_data;
@@ -2480,7 +2480,7 @@ void
gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
const GdkColor *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gint i;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
@@ -2518,7 +2518,7 @@ void
gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
guint16 alpha)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gint i;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
@@ -2546,7 +2546,7 @@ void
gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
GdkColor *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
g_return_if_fail (color != NULL);
@@ -2568,7 +2568,7 @@ gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
guint16
gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), 0);
@@ -2590,7 +2590,7 @@ void
gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
const GdkColor *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
g_return_if_fail (color != NULL);
@@ -2623,7 +2623,7 @@ void
gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
guint16 alpha)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
@@ -2647,7 +2647,7 @@ void
gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
GdkColor *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
g_return_if_fail (color != NULL);
@@ -2669,7 +2669,7 @@ gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
guint16
gtk_color_selection_get_previous_alpha (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), 0);
@@ -2691,7 +2691,7 @@ gtk_color_selection_set_palette_color (GtkColorSelection *colorsel,
gint index,
GdkColor *color)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
gint x, y;
gdouble col[3];
@@ -2721,7 +2721,7 @@ gtk_color_selection_set_palette_color (GtkColorSelection *colorsel,
gboolean
gtk_color_selection_is_adjusting (GtkColorSelection *colorsel)
{
GtkColorSelectionPrivate *priv;
ColorSelectionPrivate *priv;
g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE);
@@ -2902,7 +2902,7 @@ make_control_relations (AtkObject *atk_obj,
static void
make_all_relations (AtkObject *atk_obj,
GtkColorSelectionPrivate *priv)
ColorSelectionPrivate *priv)
{
make_control_relations (atk_obj, priv->hue_spinbutton);
make_control_relations (atk_obj, priv->sat_spinbutton);
+2 -2
View File
@@ -46,7 +46,7 @@ G_BEGIN_DECLS
typedef struct _GtkColorSelection GtkColorSelection;
typedef struct _GtkColorSelectionPrivate GtkColorSelectionPrivate;
typedef struct _ColorSelectionPrivate ColorSelectionPrivate;
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
typedef void (* GtkColorSelectionChangePaletteFunc) (const GdkColor *colors,
@@ -60,7 +60,7 @@ struct _GtkColorSelection
GtkVBox parent_instance;
/* < private_data > */
GtkColorSelectionPrivate *private_data;
ColorSelectionPrivate *private_data;
};
struct _GtkColorSelectionClass
+3
View File
@@ -151,6 +151,7 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
content_area = gtk_dialog_get_content_area (dialog);
action_area = gtk_dialog_get_action_area (dialog);
gtk_dialog_set_has_separator (dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
@@ -187,6 +188,8 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
gtk_window_set_title (GTK_WINDOW (colorseldiag),
_("Color Selection"));
_gtk_dialog_set_ignore_separator (dialog, TRUE);
}
GtkWidget*
+26 -26
View File
@@ -617,53 +617,53 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
/* key bindings */
binding_set = gtk_binding_set_by_class (widget_class);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_MOD1_MASK,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Down, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, GDK_MOD1_MASK,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_MOD1_MASK,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Up, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, GDK_MOD1_MASK,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Home, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_START);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Home, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_START);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_End, 0,
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_END);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_End, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_END);
@@ -3986,8 +3986,8 @@ gtk_combo_box_list_key_press (GtkWidget *widget,
GtkComboBox *combo_box = GTK_COMBO_BOX (data);
GtkTreeIter iter;
if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_ISO_Enter || event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_space || event->keyval == GDK_KEY_KP_Space)
if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter ||
event->keyval == GDK_space || event->keyval == GDK_KP_Space)
{
GtkTreeModel *model = NULL;
@@ -5503,7 +5503,7 @@ gtk_cell_editable_key_press (GtkWidget *widget,
{
GtkComboBox *combo_box = GTK_COMBO_BOX (data);
if (event->keyval == GDK_KEY_Escape)
if (event->keyval == GDK_Escape)
{
g_object_set (combo_box,
"editing-canceled", TRUE,
@@ -5513,9 +5513,9 @@ gtk_cell_editable_key_press (GtkWidget *widget,
return TRUE;
}
else if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter)
else if (event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
@@ -6172,8 +6172,8 @@ gtk_combo_box_get_height (GtkSizeRequest *widget,
/* Combo box is height-for-width only
* (so we always just reserve enough height for the minimum width) */
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, &min_width, NULL);
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_height_for_width (widget, min_width, minimum_size, natural_size);
gtk_size_request_get_width (widget, &min_width, NULL);
gtk_size_request_get_height_for_width (widget, min_width, minimum_size, natural_size);
}
static void
@@ -6184,7 +6184,7 @@ gtk_combo_box_get_width_for_height (GtkSizeRequest *widget,
{
/* Combo box is height-for-width only
* (so we assume we always reserved enough height for the minimum width) */
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_size, natural_size);
gtk_size_request_get_width (widget, minimum_size, natural_size);
}
+12 -123
View File
@@ -107,13 +107,6 @@ static gint gtk_container_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_container_map (GtkWidget *widget);
static void gtk_container_unmap (GtkWidget *widget);
static void gtk_container_adjust_size_request (GtkWidget *widget,
GtkOrientation orientation,
gint for_size,
gint *minimum_size,
gint *natural_size);
static void gtk_container_adjust_size_allocation (GtkWidget *widget,
GtkAllocation *allocation);
static gchar* gtk_container_child_default_composite_name (GtkContainer *container,
GtkWidget *child);
@@ -240,10 +233,7 @@ gtk_container_class_init (GtkContainerClass *class)
widget_class->map = gtk_container_map;
widget_class->unmap = gtk_container_unmap;
widget_class->focus = gtk_container_focus;
widget_class->adjust_size_request = gtk_container_adjust_size_request;
widget_class->adjust_size_allocation = gtk_container_adjust_size_allocation;
class->add = gtk_container_add_unimplemented;
class->remove = gtk_container_remove_unimplemented;
class->check_resize = gtk_container_real_check_resize;
@@ -1088,12 +1078,6 @@ gtk_container_destroy (GtkObject *object)
if (GTK_CONTAINER_RESIZE_PENDING (container))
_gtk_container_dequeue_resize_handler (container);
if (priv->focus_child)
{
g_object_unref (priv->focus_child);
priv->focus_child = NULL;
}
/* do this before walking child widgets, to avoid
* removing children from focus chain one by one.
*/
@@ -1268,7 +1252,13 @@ gtk_container_remove (GtkContainer *container,
{
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container));
/* When using the deprecated API of the toolbar, it is possible
* to legitimately call this function with a widget that is not
* a direct child of the container.
*/
g_return_if_fail (GTK_IS_TOOLBAR (container) ||
gtk_widget_get_parent (widget) == GTK_WIDGET (container));
g_signal_emit (container, container_signals[REMOVE], 0, widget);
}
@@ -1418,6 +1408,7 @@ _gtk_container_queue_resize (GtkContainer *container)
while (TRUE)
{
GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
GTK_PRIVATE_SET_FLAG (widget, GTK_WIDTH_REQUEST_NEEDED);
GTK_PRIVATE_SET_FLAG (widget, GTK_HEIGHT_REQUEST_NEEDED);
@@ -1530,103 +1521,6 @@ gtk_container_resize_children (GtkContainer *container)
gtk_widget_set_allocation (widget, &allocation);
}
static void
gtk_container_adjust_size_request (GtkWidget *widget,
GtkOrientation orientation,
gint for_size,
gint *minimum_size,
gint *natural_size)
{
GtkContainer *container;
container = GTK_CONTAINER (widget);
if (GTK_CONTAINER_GET_CLASS (widget)->handle_border_width)
{
int border_width;
border_width = container->priv->border_width;
*minimum_size += border_width * 2;
*natural_size += border_width * 2;
}
/* chain up last so gtk_widget_set_size_request() values
* will have a chance to overwrite our border width.
*/
parent_class->adjust_size_request (widget, orientation, for_size,
minimum_size, natural_size);
}
static void
gtk_container_adjust_size_allocation (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkContainer *container;
int border_width;
container = GTK_CONTAINER (widget);
parent_class->adjust_size_allocation (widget, allocation);
if (!GTK_CONTAINER_GET_CLASS (widget)->handle_border_width)
return;
border_width = container->priv->border_width;
allocation->width -= border_width * 2;
allocation->height -= border_width * 2;
/* If we get a pathological too-small allocation to hold
* even the border width, leave all allocation to the actual
* widget, and leave x,y unchanged. (GtkWidget's min size is
* 1x1 if you're wondering why <1 and not <0)
*
* As long as we have space, set x,y properly.
*/
if (allocation->width < 1)
{
allocation->width += border_width * 2;
}
else
{
allocation->x += border_width;
}
if (allocation->height < 1)
{
allocation->height += border_width * 2;
}
else
{
allocation->y += border_width;
}
}
/**
* gtk_container_class_handle_border_width:
* @klass: the class struct of a #GtkContainer subclass
*
* Modifies a subclass of #GtkContainerClass to automatically add and
* remove the border-width setting on GtkContainer. This allows the
* subclass to ignore the border width in its size request and
* allocate methods. The intent is for a subclass to invoke this
* in its class_init function.
*
* gtk_container_class_handle_border_width() is necessary because it
* would break API too badly to make this behavior the default. So
* subclasses must "opt in" to the parent class handling border_width
* for them.
*/
void
gtk_container_class_handle_border_width (GtkContainerClass *klass)
{
g_return_if_fail (GTK_IS_CONTAINER_CLASS (klass));
klass->handle_border_width = TRUE;
}
/**
* gtk_container_forall:
* @container: a #GtkContainer
@@ -1693,9 +1587,6 @@ gtk_container_foreach (GtkContainer *container,
* This function emits the GtkContainer::set_focus_child signal of
* @container. Implementations of #GtkContainer can override the
* default behaviour by overriding the class closure of this signal.
*
* This is function is mostly meant to be used by widgets. Applications can use
* gtk_widget_grab_focus() to manualy set the focus to a specific widget.
*/
void
gtk_container_set_focus_child (GtkContainer *container,
@@ -1712,12 +1603,10 @@ gtk_container_set_focus_child (GtkContainer *container,
* gtk_container_get_focus_child:
* @container: a #GtkContainer
*
* Returns the current focus child widget inside @container. This is not the
* currently focused widget. That can be obtained by calling
* gtk_window_get_focus().
* Returns the current focus child widget inside @container.
*
* Returns: The child widget which will recieve the focus inside @container when
* the @conatiner is focussed, or %NULL if none is set.
* Returns: The child widget which has the focus
* inside @container, or %NULL if none is set.
*
* Since: 2.14
**/
-4
View File
@@ -62,8 +62,6 @@ struct _GtkContainerClass
{
GtkWidgetClass parent_class;
unsigned int handle_border_width : 1;
void (*add) (GtkContainer *container,
GtkWidget *widget);
void (*remove) (GtkContainer *container,
@@ -196,8 +194,6 @@ void gtk_container_forall (GtkContainer *container,
GtkCallback callback,
gpointer callback_data);
void gtk_container_class_handle_border_width (GtkContainerClass *klass);
/* Non-public methods */
void _gtk_container_queue_resize (GtkContainer *container);
void _gtk_container_clear_resize_widgets (GtkContainer *container);
+1
View File
@@ -976,6 +976,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
content_area = gtk_dialog_get_content_area (cpu_dialog);
action_area = gtk_dialog_get_action_area (cpu_dialog);
gtk_dialog_set_has_separator (cpu_dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
+12 -3
View File
@@ -54,7 +54,7 @@ typedef enum {
#ifdef G_ENABLE_DEBUG
#define GTK_NOTE(type,action) G_STMT_START { \
if (gtk_get_debug_flags () & GTK_DEBUG_##type) \
if (gtk_debug_flags & GTK_DEBUG_##type) \
{ action; }; } G_STMT_END
#else /* !G_ENABLE_DEBUG */
@@ -63,8 +63,17 @@ typedef enum {
#endif /* G_ENABLE_DEBUG */
guint gtk_get_debug_flags (void);
void gtk_set_debug_flags (guint flags);
#ifdef G_OS_WIN32
# ifdef GTK_COMPILATION
# define GTKVAR __declspec(dllexport)
# else
# define GTKVAR extern __declspec(dllimport)
# endif
#else
# define GTKVAR extern
#endif
GTKVAR guint gtk_debug_flags;
G_END_DECLS
+161 -7
View File
@@ -31,6 +31,7 @@
#include "gtkdialog.h"
#include "gtkhbbox.h"
#include "gtklabel.h"
#include "gtkhseparator.h"
#include "gtkmarshalers.h"
#include "gtkvbox.h"
#include "gdkkeysyms.h"
@@ -45,6 +46,10 @@ struct _GtkDialogPrivate
{
GtkWidget *vbox;
GtkWidget *action_area;
GtkWidget *separator;
guint ignore_separator : 1;
};
typedef struct _ResponseData ResponseData;
@@ -61,6 +66,15 @@ static void gtk_dialog_add_buttons_valist (GtkDialog *dialog,
static gboolean gtk_dialog_delete_event_handler (GtkWidget *widget,
GdkEventAny *event,
gpointer user_data);
static void gtk_dialog_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_dialog_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_dialog_style_set (GtkWidget *widget,
GtkStyle *prev_style);
static void gtk_dialog_map (GtkWidget *widget);
@@ -110,17 +124,33 @@ gtk_dialog_class_init (GtkDialogClass *class)
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkBindingSet *binding_set;
gobject_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
gobject_class->set_property = gtk_dialog_set_property;
gobject_class->get_property = gtk_dialog_get_property;
widget_class->map = gtk_dialog_map;
widget_class->style_set = gtk_dialog_style_set;
class->close = gtk_dialog_close;
g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate));
/**
* GtkDialog:has-separator:
*
* When %TRUE, the dialog has a separator bar above its buttons.
*/
g_object_class_install_property (gobject_class,
PROP_HAS_SEPARATOR,
g_param_spec_boolean ("has-separator",
P_("Has separator"),
P_("The dialog has a separator bar above its buttons"),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkDialog::response:
* @dialog: the object on which the signal is emitted
@@ -206,7 +236,7 @@ gtk_dialog_class_init (GtkDialogClass *class)
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0);
}
static void
@@ -248,6 +278,8 @@ gtk_dialog_init (GtkDialog *dialog)
GtkDialogPrivate);
priv = dialog->priv;
priv->ignore_separator = FALSE;
/* To avoid breaking old code that prevents destroy on delete event
* by connecting a handler, we have to have the FIRST signal
* connection on the dialog.
@@ -271,6 +303,10 @@ gtk_dialog_init (GtkDialog *dialog)
FALSE, TRUE, 0);
gtk_widget_show (priv->action_area);
priv->separator = gtk_hseparator_new ();
gtk_box_pack_end (GTK_BOX (priv->vbox), priv->separator, FALSE, TRUE, 0);
gtk_widget_show (priv->separator);
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
@@ -304,6 +340,49 @@ gtk_dialog_buildable_get_internal_child (GtkBuildable *buildable,
childname);
}
static void
gtk_dialog_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkDialog *dialog;
dialog = GTK_DIALOG (object);
switch (prop_id)
{
case PROP_HAS_SEPARATOR:
gtk_dialog_set_has_separator (dialog, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_dialog_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkDialog *dialog = GTK_DIALOG (object);
GtkDialogPrivate *priv = dialog->priv;
switch (prop_id)
{
case PROP_HAS_SEPARATOR:
g_value_set_boolean (value, priv->separator != NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static gboolean
gtk_dialog_delete_event_handler (GtkWidget *widget,
GdkEventAny *event,
@@ -455,10 +534,13 @@ gtk_dialog_new_empty (const gchar *title,
if (flags & GTK_DIALOG_MODAL)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
if (flags & GTK_DIALOG_DESTROY_WITH_PARENT)
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
if (flags & GTK_DIALOG_NO_SEPARATOR)
gtk_dialog_set_has_separator (dialog, FALSE);
return GTK_WIDGET (dialog);
}
@@ -633,7 +715,7 @@ gtk_dialog_add_action_widget (GtkDialog *dialog,
* appended to the end of the dialog's action area. The button widget is
* returned, but usually you don't need it.
*
* Return value: (transfer full): the button widget that was added
* Return value: the button widget that was added
**/
GtkWidget*
gtk_dialog_add_button (GtkDialog *dialog,
@@ -790,6 +872,69 @@ gtk_dialog_set_default_response (GtkDialog *dialog,
g_list_free (children);
}
/**
* gtk_dialog_set_has_separator:
* @dialog: a #GtkDialog
* @setting: %TRUE to have a separator
*
* Sets whether the dialog has a separator above the buttons.
* %TRUE by default.
**/
void
gtk_dialog_set_has_separator (GtkDialog *dialog,
gboolean setting)
{
GtkDialogPrivate *priv;
g_return_if_fail (GTK_IS_DIALOG (dialog));
priv = dialog->priv;
/* this might fail if we get called before _init() somehow */
g_assert (priv->vbox != NULL);
if (priv->ignore_separator)
{
g_warning ("Ignoring the separator setting");
return;
}
if (setting && priv->separator == NULL)
{
priv->separator = gtk_hseparator_new ();
gtk_box_pack_end (GTK_BOX (priv->vbox), priv->separator, FALSE, TRUE, 0);
/* The app programmer could screw this up, but, their own fault.
* Moves the separator just above the action area.
*/
gtk_box_reorder_child (GTK_BOX (priv->vbox), priv->separator, 1);
gtk_widget_show (priv->separator);
}
else if (!setting && priv->separator != NULL)
{
gtk_widget_destroy (priv->separator);
priv->separator = NULL;
}
g_object_notify (G_OBJECT (dialog), "has-separator");
}
/**
* gtk_dialog_get_has_separator:
* @dialog: a #GtkDialog
*
* Accessor for whether the dialog has a separator.
*
* Return value: %TRUE if the dialog has a separator
**/
gboolean
gtk_dialog_get_has_separator (GtkDialog *dialog)
{
g_return_val_if_fail (GTK_IS_DIALOG (dialog), FALSE);
return dialog->priv->separator != NULL;
}
/**
* gtk_dialog_response:
* @dialog: a #GtkDialog
@@ -991,6 +1136,15 @@ gtk_dialog_run (GtkDialog *dialog)
return ri.response_id;
}
void
_gtk_dialog_set_ignore_separator (GtkDialog *dialog,
gboolean ignore_separator)
{
GtkDialogPrivate *priv = dialog->priv;
priv->ignore_separator = ignore_separator;
}
/**
* gtk_dialog_get_widget_for_response:
* @dialog: a #GtkDialog
@@ -999,7 +1153,7 @@ gtk_dialog_run (GtkDialog *dialog)
* Gets the widget button that uses the given response ID in the action area
* of a dialog.
*
* Returns: (transfer none):the @widget button that uses the given @response_id, or %NULL.
* Returns: the @widget button that uses the given @response_id, or %NULL.
*
* Since: 2.20
*/
+10 -1
View File
@@ -41,7 +41,8 @@ G_BEGIN_DECLS
typedef enum
{
GTK_DIALOG_MODAL = 1 << 0, /* call gtk_window_set_modal (win, TRUE) */
GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1 /* call gtk_window_set_destroy_with_parent () */
GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1, /* call gtk_window_set_destroy_with_parent () */
GTK_DIALOG_NO_SEPARATOR = 1 << 2 /* no separator bar above buttons */
} GtkDialogFlags;
/* Convenience enum to use for response_id's. Positive values are
@@ -149,6 +150,10 @@ GtkWidget* gtk_dialog_get_widget_for_response (GtkDialog *dialog,
gint gtk_dialog_get_response_for_widget (GtkDialog *dialog,
GtkWidget *widget);
void gtk_dialog_set_has_separator (GtkDialog *dialog,
gboolean setting);
gboolean gtk_dialog_get_has_separator (GtkDialog *dialog);
gboolean gtk_alternative_dialog_button_order (GdkScreen *screen);
void gtk_dialog_set_alternative_button_order (GtkDialog *dialog,
gint first_response_id,
@@ -167,6 +172,10 @@ gint gtk_dialog_run (GtkDialog *dialog);
GtkWidget * gtk_dialog_get_action_area (GtkDialog *dialog);
GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog);
/* For private use only */
void _gtk_dialog_set_ignore_separator (GtkDialog *dialog,
gboolean ignore_separator);
G_END_DECLS
#endif /* __GTK_DIALOG_H__ */
+14 -14
View File
@@ -4219,36 +4219,36 @@ gtk_drag_key_cb (GtkWidget *widget,
{
switch (event->keyval)
{
case GDK_KEY_Escape:
case GDK_Escape:
gtk_drag_cancel (info, GTK_DRAG_RESULT_USER_CANCELLED, event->time);
return TRUE;
case GDK_KEY_space:
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
gtk_drag_end (info, event->time);
gtk_drag_drop (info, event->time);
return TRUE;
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
case GDK_Up:
case GDK_KP_Up:
dy = (state & GDK_MOD1_MASK) ? -BIG_STEP : -SMALL_STEP;
break;
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
case GDK_Down:
case GDK_KP_Down:
dy = (state & GDK_MOD1_MASK) ? BIG_STEP : SMALL_STEP;
break;
case GDK_KEY_Left:
case GDK_KEY_KP_Left:
case GDK_Left:
case GDK_KP_Left:
dx = (state & GDK_MOD1_MASK) ? -BIG_STEP : -SMALL_STEP;
break;
case GDK_KEY_Right:
case GDK_KEY_KP_Right:
case GDK_Right:
case GDK_KP_Right:
dx = (state & GDK_MOD1_MASK) ? BIG_STEP : SMALL_STEP;
break;
}
+125 -78
View File
@@ -1581,85 +1581,85 @@ gtk_entry_class_init (GtkEntryClass *class)
binding_set = gtk_binding_set_by_class (class);
/* Moving the insertion point */
add_move_binding (binding_set, GDK_KEY_Right, 0,
add_move_binding (binding_set, GDK_Right, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_KEY_Left, 0,
add_move_binding (binding_set, GDK_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_KEY_KP_Right, 0,
add_move_binding (binding_set, GDK_KP_Right, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_KEY_KP_Left, 0,
add_move_binding (binding_set, GDK_KP_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_KEY_Right, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_KEY_Left, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_KEY_KP_Right, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KP_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_KEY_KP_Left, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_KEY_Home, 0,
add_move_binding (binding_set, GDK_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
add_move_binding (binding_set, GDK_KEY_End, 0,
add_move_binding (binding_set, GDK_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
add_move_binding (binding_set, GDK_KEY_KP_Home, 0,
add_move_binding (binding_set, GDK_KP_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
add_move_binding (binding_set, GDK_KEY_KP_End, 0,
add_move_binding (binding_set, GDK_KP_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
add_move_binding (binding_set, GDK_KEY_Home, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
add_move_binding (binding_set, GDK_KEY_End, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
add_move_binding (binding_set, GDK_KEY_KP_Home, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KP_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
add_move_binding (binding_set, GDK_KEY_KP_End, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
/* Select all
*/
gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_slash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_slash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, TRUE);
/* Unselect all
*/
gtk_binding_entry_add_signal (binding_set, GDK_KEY_backslash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_VISUAL_POSITIONS,
G_TYPE_INT, 0,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"move-cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_VISUAL_POSITIONS,
G_TYPE_INT, 0,
@@ -1667,66 +1667,66 @@ gtk_entry_class_init (GtkEntryClass *class)
/* Activate
*/
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_ISO_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate", 0);
/* Deleting text */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_CHARS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Delete, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, 0,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_CHARS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0,
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0,
"backspace", 0);
/* Make this do the same as Backspace, to help with mis-typing */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
"backspace", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Delete, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, GDK_CONTROL_MASK,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_CONTROL_MASK,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
G_TYPE_INT, -1);
/* Cut/copy/paste */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_x, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_x, GDK_CONTROL_MASK,
"cut-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_c, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_c, GDK_CONTROL_MASK,
"copy-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_v, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_v, GDK_CONTROL_MASK,
"paste-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_SHIFT_MASK,
"cut-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_CONTROL_MASK,
"copy-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_SHIFT_MASK,
"paste-clipboard", 0);
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, 0,
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
"toggle-overwrite", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Insert, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KP_Insert, 0,
"toggle-overwrite", 0);
/**
@@ -1743,6 +1743,21 @@ gtk_entry_class_init (GtkEntryClass *class)
GTK_TYPE_BORDER,
GTK_PARAM_READABLE));
/**
* GtkEntry:state-hint:
*
* Indicates whether to pass a proper widget state when
* drawing the shadow and the widget background.
*
* Since: 2.16
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("state-hint",
P_("State Hint"),
P_("Whether to pass a proper state when drawing shadow or background"),
FALSE,
GTK_PARAM_READABLE));
gtk_settings_install_property (g_param_spec_boolean ("gtk-entry-select-on-focus",
P_("Select on focus"),
P_("Whether to select the contents of an entry when it is focused"),
@@ -3283,6 +3298,7 @@ gtk_entry_draw_frame (GtkWidget *widget,
GtkStyle *style;
GdkWindow *window;
gint x = 0, y = 0, width, height;
gboolean state_hint;
GtkStateType state;
window = gtk_widget_get_window (widget);
@@ -3311,8 +3327,12 @@ gtk_entry_draw_frame (GtkWidget *widget,
}
style = gtk_widget_get_style (widget);
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
gtk_widget_style_get (widget, "state-hint", &state_hint, NULL);
if (state_hint)
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
else
state = GTK_STATE_NORMAL;
gtk_paint_shadow (style, window,
state, priv->shadow_type,
@@ -3458,13 +3478,19 @@ gtk_entry_expose (GtkWidget *widget,
{
GtkEntry *entry = GTK_ENTRY (widget);
GtkStyle *style;
gboolean state_hint;
GtkStateType state;
GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
style = gtk_widget_get_style (widget);
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
gtk_widget_style_get (widget, "state-hint", &state_hint, NULL);
if (state_hint)
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
else
state = gtk_widget_get_state(widget);
if (gtk_widget_get_window (widget) == event->window)
{
@@ -3509,7 +3535,7 @@ gtk_entry_expose (GtkWidget *widget,
gdk_drawable_get_size (icon_info->window, &width, &height);
gtk_paint_flat_box (style, icon_info->window,
state, GTK_SHADOW_NONE,
gtk_widget_get_state (widget), GTK_SHADOW_NONE,
NULL, widget, "entry_bg",
0, 0, width, height);
@@ -4104,10 +4130,10 @@ gtk_entry_key_press (GtkWidget *widget,
}
}
if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_Escape)
if (event->keyval == GDK_Return ||
event->keyval == GDK_KP_Enter ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_Escape)
{
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
@@ -4351,8 +4377,8 @@ gtk_entry_get_chars (GtkEditable *editable,
start_pos = MIN (text_length, start_pos);
end_pos = MIN (text_length, end_pos);
start_index = g_utf8_offset_to_pointer (text, start_pos) - text;
end_index = g_utf8_offset_to_pointer (text, end_pos) - text;
start_index = g_utf8_offset_to_pointer (text, start_pos) - entry->text;
end_index = g_utf8_offset_to_pointer (text, end_pos) - entry->text;
return g_strndup (text + start_index, end_index - start_index);
}
@@ -4513,7 +4539,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
GdkEventKey *key_event,
gpointer data)
{
if (key_event->keyval == GDK_KEY_Escape)
if (key_event->keyval == GDK_Escape)
{
entry->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
@@ -4523,7 +4549,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
}
/* override focus */
if (key_event->keyval == GDK_KEY_Up || key_event->keyval == GDK_KEY_Down)
if (key_event->keyval == GDK_Up || key_event->keyval == GDK_Down)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
@@ -4694,6 +4720,9 @@ buffer_notify_text (GtkEntryBuffer *buffer,
GParamSpec *spec,
GtkEntry *entry)
{
/* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
entry->text = (gchar*)gtk_entry_buffer_get_text (buffer);
gtk_entry_recompute (entry);
emit_changed (entry);
g_object_notify (G_OBJECT (entry), "text");
@@ -4704,6 +4733,9 @@ buffer_notify_length (GtkEntryBuffer *buffer,
GParamSpec *spec,
GtkEntry *entry)
{
/* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
entry->text_length = gtk_entry_buffer_get_length (buffer);
g_object_notify (G_OBJECT (entry), "text-length");
}
@@ -4712,6 +4744,9 @@ buffer_notify_max_length (GtkEntryBuffer *buffer,
GParamSpec *spec,
GtkEntry *entry)
{
/* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
entry->text_max_length = gtk_entry_buffer_get_max_length (buffer);
g_object_notify (G_OBJECT (entry), "max-length");
}
@@ -6727,12 +6762,24 @@ gtk_entry_set_buffer (GtkEntry *entry,
{
buffer_disconnect_signals (entry);
g_object_unref (priv->buffer);
/* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
entry->text = NULL;
entry->text_length = 0;
entry->text_max_length = 0;
}
priv->buffer = buffer;
if (priv->buffer)
buffer_connect_signals (entry);
{
buffer_connect_signals (entry);
/* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
entry->text = (char*)gtk_entry_buffer_get_text (priv->buffer);
entry->text_length = gtk_entry_buffer_get_length (priv->buffer);
entry->text_max_length = gtk_entry_buffer_get_max_length (priv->buffer);
}
obj = G_OBJECT (entry);
g_object_freeze_notify (obj);
@@ -9215,16 +9262,16 @@ gtk_entry_completion_timeout (gpointer data)
static inline gboolean
keyval_is_cursor_move (guint keyval)
{
if (keyval == GDK_KEY_Up || keyval == GDK_KEY_KP_Up)
if (keyval == GDK_Up || keyval == GDK_KP_Up)
return TRUE;
if (keyval == GDK_KEY_Down || keyval == GDK_KEY_KP_Down)
if (keyval == GDK_Down || keyval == GDK_KP_Down)
return TRUE;
if (keyval == GDK_KEY_Page_Up)
if (keyval == GDK_Page_Up)
return TRUE;
if (keyval == GDK_KEY_Page_Down)
if (keyval == GDK_Page_Down)
return TRUE;
return FALSE;
@@ -9250,21 +9297,21 @@ gtk_entry_completion_key_press (GtkWidget *widget,
{
GtkTreePath *path = NULL;
if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_KP_Up)
if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = matches + actions - 1;
else
completion->priv->current_selected--;
}
else if (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_KP_Down)
else if (event->keyval == GDK_Down || event->keyval == GDK_KP_Down)
{
if (completion->priv->current_selected < matches + actions - 1)
completion->priv->current_selected++;
else
completion->priv->current_selected = -1;
}
else if (event->keyval == GDK_KEY_Page_Up)
else if (event->keyval == GDK_Page_Up)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = matches + actions - 1;
@@ -9283,7 +9330,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
completion->priv->current_selected = matches - 1;
}
}
else if (event->keyval == GDK_KEY_Page_Down)
else if (event->keyval == GDK_Page_Down)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = 0;
@@ -9370,11 +9417,11 @@ gtk_entry_completion_key_press (GtkWidget *widget,
return TRUE;
}
else if (event->keyval == GDK_KEY_Escape ||
event->keyval == GDK_KEY_Left ||
event->keyval == GDK_KEY_KP_Left ||
event->keyval == GDK_KEY_Right ||
event->keyval == GDK_KEY_KP_Right)
else if (event->keyval == GDK_Escape ||
event->keyval == GDK_Left ||
event->keyval == GDK_KP_Left ||
event->keyval == GDK_Right ||
event->keyval == GDK_KP_Right)
{
gboolean retval = TRUE;
@@ -9389,7 +9436,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
else if (completion->priv->inline_selection)
{
/* Escape rejects the tentative completion */
if (event->keyval == GDK_KEY_Escape)
if (event->keyval == GDK_Escape)
{
if (completion->priv->completion_prefix)
gtk_entry_set_text (GTK_ENTRY (completion->priv->entry),
@@ -9400,9 +9447,9 @@ gtk_entry_completion_key_press (GtkWidget *widget,
/* Move the cursor to the end for Right/Esc, to the
beginning for Left */
if (event->keyval == GDK_KEY_Right ||
event->keyval == GDK_KEY_KP_Right ||
event->keyval == GDK_KEY_Escape)
if (event->keyval == GDK_Right ||
event->keyval == GDK_KP_Right ||
event->keyval == GDK_Escape)
gtk_editable_set_position (GTK_EDITABLE (widget), -1);
else
gtk_editable_set_position (GTK_EDITABLE (widget), 0);
@@ -9417,11 +9464,11 @@ keypress_completion_out:
return retval;
}
else if (event->keyval == GDK_KEY_Tab ||
event->keyval == GDK_KEY_KP_Tab ||
event->keyval == GDK_KEY_ISO_Left_Tab)
else if (event->keyval == GDK_Tab ||
event->keyval == GDK_KP_Tab ||
event->keyval == GDK_ISO_Left_Tab)
{
GtkDirectionType dir = event->keyval == GDK_KEY_ISO_Left_Tab ?
GtkDirectionType dir = event->keyval == GDK_ISO_Left_Tab ?
GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
_gtk_entry_reset_im_context (GTK_ENTRY (widget));
@@ -9434,9 +9481,9 @@ keypress_completion_out:
return TRUE;
}
else if (event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_Return)
else if (event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter ||
event->keyval == GDK_Return)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
+5
View File
@@ -67,12 +67,17 @@ struct _GtkEntry
{
GtkWidget widget;
gchar *GSEAL (text); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
guint GSEAL (editable) : 1;
guint GSEAL (visible) : 1;
guint GSEAL (overwrite_mode) : 1;
guint GSEAL (in_drag) : 1; /* FIXME: Should be private?
Dragging within the selection */
guint16 GSEAL (text_length); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
guint16 GSEAL (text_max_length); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
/*< private >*/
GdkWindow *GSEAL (text_area);
GtkIMContext *GSEAL (im_context);
+50 -51
View File
@@ -35,35 +35,27 @@
G_BEGIN_DECLS
/**
* GtkAlign:
*
* @GTK_ALIGN_FILL: stretch to fill all space if possible, center if
* no meaningful way to stretch
* @GTK_ALIGN_START: snap to left or top side, leaving space on right
* or bottom
* @GTK_ALIGN_END: snap to right or bottom side, leaving space on left
* or top
* @GTK_ALIGN_CENTER: center natural width of widget inside the
* allocation
*
* Controls how a widget deals with extra space in a single (x or y)
* dimension.
*
* Alignment only matters if the widget receives a "too large"
* allocation, for example if you packed the widget with the "expand"
* flag inside a #GtkBox, then the widget might get extra space. If
* you have for example a 16x16 icon inside a 32x32 space, the icon
* could be scaled and stretched, it could be centered, or it could be
* positioned to one side of the space.
*/
/* Anchor types */
typedef enum
{
GTK_ALIGN_FILL,
GTK_ALIGN_START,
GTK_ALIGN_END,
GTK_ALIGN_CENTER
} GtkAlign;
GTK_ANCHOR_CENTER,
GTK_ANCHOR_NORTH,
GTK_ANCHOR_NORTH_WEST,
GTK_ANCHOR_NORTH_EAST,
GTK_ANCHOR_SOUTH,
GTK_ANCHOR_SOUTH_WEST,
GTK_ANCHOR_SOUTH_EAST,
GTK_ANCHOR_WEST,
GTK_ANCHOR_EAST,
GTK_ANCHOR_N = GTK_ANCHOR_NORTH,
GTK_ANCHOR_NW = GTK_ANCHOR_NORTH_WEST,
GTK_ANCHOR_NE = GTK_ANCHOR_NORTH_EAST,
GTK_ANCHOR_S = GTK_ANCHOR_SOUTH,
GTK_ANCHOR_SW = GTK_ANCHOR_SOUTH_WEST,
GTK_ANCHOR_SE = GTK_ANCHOR_SOUTH_EAST,
GTK_ANCHOR_W = GTK_ANCHOR_WEST,
GTK_ANCHOR_E = GTK_ANCHOR_EAST
} GtkAnchorType;
/* Arrow placement */
typedef enum
@@ -355,7 +347,8 @@ typedef enum
GTK_SELECTION_NONE, /* Nothing can be selected */
GTK_SELECTION_SINGLE,
GTK_SELECTION_BROWSE,
GTK_SELECTION_MULTIPLE
GTK_SELECTION_MULTIPLE,
GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
} GtkSelectionMode;
/* Shadow types */
@@ -378,6 +371,22 @@ typedef enum
GTK_STATE_INSENSITIVE
} GtkStateType;
#if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
/* Directions for submenus */
typedef enum
{
GTK_DIRECTION_LEFT,
GTK_DIRECTION_RIGHT
} GtkSubmenuDirection;
/* Placement of submenus */
typedef enum
{
GTK_TOP_BOTTOM,
GTK_LEFT_RIGHT
} GtkSubmenuPlacement;
#endif /* GTK_DISABLE_DEPRECATED */
/* Style for toolbars */
typedef enum
{
@@ -395,6 +404,14 @@ typedef enum
GTK_UPDATE_DELAYED
} GtkUpdateType;
/* Generic visibility flags */
typedef enum
{
GTK_VISIBILITY_NONE,
GTK_VISIBILITY_PARTIAL,
GTK_VISIBILITY_FULL
} GtkVisibility;
/* Window position types */
typedef enum
{
@@ -559,15 +576,15 @@ typedef enum {
/**
* GtkWrapBoxSpreading:
* @GTK_WRAP_BOX_SPREAD_START: Children are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_BEGIN: Items are allocated no more than their natural size
* in the layout's orientation and any extra space is left trailing at
* the end of each line.
* @GTK_WRAP_BOX_SPREAD_END: Children are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_END: Items are allocated no more than their natural size
* in the layout's orientation and any extra space skipped at the beginning
* of each line.
* @GTK_WRAP_BOX_SPREAD_EVEN: Children are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_EVEN: Items are allocated no more than their natural size
* in the layout's orientation and any extra space is evenly distributed
* as empty space between children.
* between children.
* @GTK_WRAP_BOX_SPREAD_EXPAND: Items share the extra space evenly (or among children that 'expand' when
* in %GTK_WRAP_ALLOCATE_FREE mode.
*
@@ -582,30 +599,12 @@ typedef enum {
*
*/
typedef enum {
GTK_WRAP_BOX_SPREAD_START = 0,
GTK_WRAP_BOX_SPREAD_BEGIN = 0,
GTK_WRAP_BOX_SPREAD_END,
GTK_WRAP_BOX_SPREAD_EVEN,
GTK_WRAP_BOX_SPREAD_EXPAND
} GtkWrapBoxSpreading;
/**
* GtkWrapBoxPacking:
* @GTK_WRAP_BOX_H_EXPAND: Whether the child expands horizontally.
* @GTK_WRAP_BOX_H_FILL: Whether the child fills its allocated horizontal space.
* @GTK_WRAP_BOX_V_EXPAND: Whether the child expands vertically.
* @GTK_WRAP_BOX_V_FILL: Whether the child fills its allocated vertical space.
*
* Specifies how widgets will expand/fill vertically and
* horizontally when placed inside a #GtkWrapBox.
*/
typedef enum
{
GTK_WRAP_BOX_H_EXPAND = 1 << 0,
GTK_WRAP_BOX_H_FILL = 1 << 1,
GTK_WRAP_BOX_V_EXPAND = 1 << 2,
GTK_WRAP_BOX_V_FILL = 1 << 3
} GtkWrapBoxPacking;
G_END_DECLS
+2 -1
View File
@@ -1495,7 +1495,8 @@ gtk_expander_get_width_for_height (GtkSizeRequest *widget,
gint *minimum_width,
gint *natural_width)
{
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_width, natural_width);
gtk_size_request_get_width (widget, minimum_width, natural_width);
//GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_width, natural_width);
}
+169
View File
@@ -2567,3 +2567,172 @@ gtk_file_chooser_get_do_overwrite_confirmation (GtkFileChooser *chooser)
return do_overwrite_confirmation;
}
#if defined (G_OS_WIN32) && !defined (_WIN64)
/* DLL ABI stability backward compatibility versions */
#undef gtk_file_chooser_get_filename
gchar *
gtk_file_chooser_get_filename (GtkFileChooser *chooser)
{
gchar *utf8_filename = gtk_file_chooser_get_filename_utf8 (chooser);
gchar *retval = g_locale_from_utf8 (utf8_filename, -1, NULL, NULL, NULL);
g_free (utf8_filename);
return retval;
}
#undef gtk_file_chooser_set_filename
gboolean
gtk_file_chooser_set_filename (GtkFileChooser *chooser,
const gchar *filename)
{
gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL);
gboolean retval = gtk_file_chooser_set_filename_utf8 (chooser, utf8_filename);
g_free (utf8_filename);
return retval;
}
#undef gtk_file_chooser_select_filename
gboolean
gtk_file_chooser_select_filename (GtkFileChooser *chooser,
const gchar *filename)
{
gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL);
gboolean retval = gtk_file_chooser_select_filename_utf8 (chooser, utf8_filename);
g_free (utf8_filename);
return retval;
}
#undef gtk_file_chooser_unselect_filename
void
gtk_file_chooser_unselect_filename (GtkFileChooser *chooser,
const char *filename)
{
gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL);
gtk_file_chooser_unselect_filename_utf8 (chooser, utf8_filename);
g_free (utf8_filename);
}
#undef gtk_file_chooser_get_filenames
GSList *
gtk_file_chooser_get_filenames (GtkFileChooser *chooser)
{
GSList *list = gtk_file_chooser_get_filenames_utf8 (chooser);
GSList *rover = list;
while (rover)
{
gchar *tem = (gchar *) rover->data;
rover->data = g_locale_from_utf8 ((gchar *) rover->data, -1, NULL, NULL, NULL);
g_free (tem);
rover = rover->next;
}
return list;
}
#undef gtk_file_chooser_set_current_folder
gboolean
gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
const gchar *filename)
{
gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL);
gboolean retval = gtk_file_chooser_set_current_folder_utf8 (chooser, utf8_filename);
g_free (utf8_filename);
return retval;
}
#undef gtk_file_chooser_get_current_folder
gchar *
gtk_file_chooser_get_current_folder (GtkFileChooser *chooser)
{
gchar *utf8_folder = gtk_file_chooser_get_current_folder_utf8 (chooser);
gchar *retval = g_locale_from_utf8 (utf8_folder, -1, NULL, NULL, NULL);
g_free (utf8_folder);
return retval;
}
#undef gtk_file_chooser_get_preview_filename
char *
gtk_file_chooser_get_preview_filename (GtkFileChooser *chooser)
{
char *utf8_filename = gtk_file_chooser_get_preview_filename_utf8 (chooser);
char *retval = g_locale_from_utf8 (utf8_filename, -1, NULL, NULL, NULL);
g_free (utf8_filename);
return retval;
}
#undef gtk_file_chooser_add_shortcut_folder
gboolean
gtk_file_chooser_add_shortcut_folder (GtkFileChooser *chooser,
const char *folder,
GError **error)
{
char *utf8_folder = g_locale_to_utf8 (folder, -1, NULL, NULL, NULL);
gboolean retval =
gtk_file_chooser_add_shortcut_folder_utf8 (chooser, utf8_folder, error);
g_free (utf8_folder);
return retval;
}
#undef gtk_file_chooser_remove_shortcut_folder
gboolean
gtk_file_chooser_remove_shortcut_folder (GtkFileChooser *chooser,
const char *folder,
GError **error)
{
char *utf8_folder = g_locale_to_utf8 (folder, -1, NULL, NULL, NULL);
gboolean retval =
gtk_file_chooser_remove_shortcut_folder_utf8 (chooser, utf8_folder, error);
g_free (utf8_folder);
return retval;
}
#undef gtk_file_chooser_list_shortcut_folders
GSList *
gtk_file_chooser_list_shortcut_folders (GtkFileChooser *chooser)
{
GSList *list = gtk_file_chooser_list_shortcut_folders_utf8 (chooser);
GSList *rover = list;
while (rover)
{
gchar *tem = (gchar *) rover->data;
rover->data = g_locale_from_utf8 ((gchar *) rover->data, -1, NULL, NULL, NULL);
g_free (tem);
rover = rover->next;
}
return list;
}
#endif
+15
View File
@@ -145,6 +145,21 @@ void gtk_file_chooser_set_current_name (GtkFileChooser *chooser,
/* Filename manipulation
*/
#ifdef G_OS_WIN32
/* Reserve old names for DLL ABI backward compatibility */
#define gtk_file_chooser_get_filename gtk_file_chooser_get_filename_utf8
#define gtk_file_chooser_set_filename gtk_file_chooser_set_filename_utf8
#define gtk_file_chooser_select_filename gtk_file_chooser_select_filename_utf8
#define gtk_file_chooser_unselect_filename gtk_file_chooser_unselect_filename_utf8
#define gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames_utf8
#define gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder_utf8
#define gtk_file_chooser_get_current_folder gtk_file_chooser_get_current_folder_utf8
#define gtk_file_chooser_get_preview_filename gtk_file_chooser_get_preview_filename_utf8
#define gtk_file_chooser_add_shortcut_folder gtk_file_chooser_add_shortcut_folder_utf8
#define gtk_file_chooser_remove_shortcut_folder gtk_file_chooser_remove_shortcut_folder_utf8
#define gtk_file_chooser_list_shortcut_folders gtk_file_chooser_list_shortcut_folders_utf8
#endif
gchar * gtk_file_chooser_get_filename (GtkFileChooser *chooser);
gboolean gtk_file_chooser_set_filename (GtkFileChooser *chooser,
const char *filename);
+36 -36
View File
@@ -459,7 +459,7 @@ static void
_gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
{
static const guint quick_bookmark_keyvals[10] = {
GDK_KEY_1, GDK_KEY_2, GDK_KEY_3, GDK_KEY_4, GDK_KEY_5, GDK_KEY_6, GDK_KEY_7, GDK_KEY_8, GDK_KEY_9, GDK_KEY_0
GDK_1, GDK_2, GDK_3, GDK_4, GDK_5, GDK_6, GDK_7, GDK_8, GDK_9, GDK_0
};
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
@@ -583,74 +583,74 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_l, GDK_CONTROL_MASK,
GDK_l, GDK_CONTROL_MASK,
"location-toggle-popup",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_slash, 0,
GDK_slash, 0,
"location-popup",
1, G_TYPE_STRING, "/");
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_KP_Divide, 0,
GDK_KP_Divide, 0,
"location-popup",
1, G_TYPE_STRING, "/");
#ifdef G_OS_UNIX
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_asciitilde, 0,
GDK_asciitilde, 0,
"location-popup",
1, G_TYPE_STRING, "~");
#endif
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_v, GDK_CONTROL_MASK,
GDK_v, GDK_CONTROL_MASK,
"location-popup-on-paste",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_Up, GDK_MOD1_MASK,
GDK_Up, GDK_MOD1_MASK,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_BackSpace, 0,
GDK_BackSpace, 0,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_KP_Up, GDK_MOD1_MASK,
GDK_KP_Up, GDK_MOD1_MASK,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_Down, GDK_MOD1_MASK,
GDK_Down, GDK_MOD1_MASK,
"down-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_KP_Down, GDK_MOD1_MASK,
GDK_KP_Down, GDK_MOD1_MASK,
"down-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_Home, GDK_MOD1_MASK,
GDK_Home, GDK_MOD1_MASK,
"home-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_KP_Home, GDK_MOD1_MASK,
GDK_KP_Home, GDK_MOD1_MASK,
"home-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_d, GDK_MOD1_MASK,
GDK_d, GDK_MOD1_MASK,
"desktop-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_h, GDK_CONTROL_MASK,
GDK_h, GDK_CONTROL_MASK,
"show-hidden",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_s, GDK_MOD1_MASK,
GDK_s, GDK_MOD1_MASK,
"search-shortcut",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_r, GDK_MOD1_MASK,
GDK_r, GDK_MOD1_MASK,
"recent-shortcut",
0);
@@ -3327,9 +3327,9 @@ shortcuts_key_press_event_after_cb (GtkWidget *tree_view,
GtkWidget *entry;
/* don't screw up focus switching with Tab */
if (event->keyval == GDK_KEY_Tab
|| event->keyval == GDK_KEY_KP_Tab
|| event->keyval == GDK_KEY_ISO_Left_Tab
if (event->keyval == GDK_Tab
|| event->keyval == GDK_KP_Tab
|| event->keyval == GDK_ISO_Left_Tab
|| event->length < 1)
return FALSE;
@@ -3732,10 +3732,10 @@ key_is_left_or_right (GdkEventKey *event)
modifiers = gtk_accelerator_get_default_mod_mask ();
return ((event->keyval == GDK_KEY_Right
|| event->keyval == GDK_KEY_KP_Right
|| event->keyval == GDK_KEY_Left
|| event->keyval == GDK_KEY_KP_Left)
return ((event->keyval == GDK_Right
|| event->keyval == GDK_KP_Right
|| event->keyval == GDK_Left
|| event->keyval == GDK_KP_Left)
&& (event->state & modifiers) == 0);
}
@@ -3755,10 +3755,10 @@ browse_files_key_press_event_cb (GtkWidget *widget,
modifiers = gtk_accelerator_get_default_mod_mask ();
if ((event->keyval == GDK_KEY_slash
|| event->keyval == GDK_KEY_KP_Divide
if ((event->keyval == GDK_slash
|| event->keyval == GDK_KP_Divide
#ifdef G_OS_UNIX
|| event->keyval == GDK_KEY_asciitilde
|| event->keyval == GDK_asciitilde
#endif
) && ! (event->state & (~GDK_SHIFT_MASK & modifiers)))
{
@@ -3772,11 +3772,11 @@ browse_files_key_press_event_cb (GtkWidget *widget,
return TRUE;
}
if ((event->keyval == GDK_KEY_Return
|| event->keyval == GDK_KEY_ISO_Enter
|| event->keyval == GDK_KEY_KP_Enter
|| event->keyval == GDK_KEY_space
|| event->keyval == GDK_KEY_KP_Space)
if ((event->keyval == GDK_Return
|| event->keyval == GDK_ISO_Enter
|| event->keyval == GDK_KP_Enter
|| event->keyval == GDK_space
|| event->keyval == GDK_KP_Space)
&& ((event->state & modifiers) == 0)
&& !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
@@ -9693,16 +9693,16 @@ shortcuts_key_press_event_cb (GtkWidget *widget,
return TRUE;
}
if ((event->keyval == GDK_KEY_BackSpace
|| event->keyval == GDK_KEY_Delete
|| event->keyval == GDK_KEY_KP_Delete)
if ((event->keyval == GDK_BackSpace
|| event->keyval == GDK_Delete
|| event->keyval == GDK_KP_Delete)
&& (event->state & modifiers) == 0)
{
remove_selected_bookmarks (impl);
return TRUE;
}
if ((event->keyval == GDK_KEY_F2)
if ((event->keyval == GDK_F2)
&& (event->state & modifiers) == 0)
{
rename_selected_bookmark (impl);
+1
View File
@@ -92,6 +92,7 @@ gtk_file_chooser_dialog_init (GtkFileChooserDialog *dialog)
content_area = gtk_dialog_get_content_area (fc_dialog);
action_area = gtk_dialog_get_action_area (fc_dialog);
gtk_dialog_set_has_separator (fc_dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (fc_dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
+3 -3
View File
@@ -1248,7 +1248,7 @@ gtk_file_chooser_entry_key_press_event (GtkWidget *widget,
/* This is a bit evil -- it makes Tab never leave the entry. It basically
* makes it 'safe' for people to hit. */
if (event->keyval == GDK_KEY_Tab && !control_pressed)
if (event->keyval == GDK_Tab && !control_pressed)
{
if (chooser_entry->has_completion)
gtk_editable_set_position (editable, gtk_entry_get_text_length (entry));
@@ -1727,7 +1727,7 @@ insert_text_callback (GtkFileChooserEntry *chooser_entry,
*position + (colon - new_text) != 1) ||
(new_text_length > 0 &&
*position <= 1 &&
gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 2 &&
GTK_ENTRY (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':'))
{
gtk_widget_error_bell (GTK_WIDGET (chooser_entry));
@@ -1746,7 +1746,7 @@ delete_text_callback (GtkFileChooserEntry *chooser_entry,
{
/* If deleting a drive letter, delete the colon, too */
if (start_pos == 0 && end_pos == 1 &&
gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 2 &&
GTK_ENTRY (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':')
{
g_signal_handlers_block_by_func (chooser_entry,

Some files were not shown because too many files have changed in this diff Show More