Compare commits

...

193 Commits

Author SHA1 Message Date
Havoc Pennington 733991c84d Rename GtkWidget padding to margin 2010-09-11 19:41:24 -04:00
Havoc Pennington 83008588e1 Use gint16 for GtkBorder
32K of border ought to be enough for any pixel dimensions. At least
until screens are so huge we start using doubles.

This saves a nice 64 bits of space when we have a GtkBorder
stored somewhere.

Signed integers are used to avoid surprising unsigned math
issues. Just search GTK's whole git log from inception
for "unsigned" if you want to find any number of commits
fixing signed/unsigned bugs.
2010-09-11 19:25:57 -04:00
Havoc Pennington cbfbe68eca Adapt to widget->allocation becoming private 2010-09-11 17:10:54 -04:00
Havoc Pennington dd3f8cefeb Just use GtkBorder for padding in GtkAuxInfo 2010-09-11 17:10:37 -04:00
Havoc Pennington c818f8714f Merge remote branch 'origin/master' into widget-padding 2010-09-11 12:59:47 -04:00
Matthias Clasen 08dd02fe25 Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
2010-09-10 22:32:44 -04:00
Javier Jardón d3661589f4 gtk/gtkwidget.c: Use accessor functions to access GtkWindowGroup 2010-09-11 04:25:41 +02:00
Javier Jardón ab248d7ca3 Revert "gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup"
This reverts commit 65b9fc3e5b.
2010-09-11 04:24:54 +02:00
Javier Jardón 65b9fc3e5b gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup 2010-09-11 03:34:01 +02:00
Javier Jardón 6eae25e0b0 GtkWindow: move public members to private structure
Signed-off-by: Christian Dywan <christian@twotoasts.de>
2010-09-11 02:22:28 +02:00
Matthias Clasen 402e3bed47 Bump version to 2.90.8 2010-09-10 12:31:15 -04:00
Matthias Clasen 056ec835cc Include gdkkeysyms.h in gdk.h
Followup to bug 629093
2010-09-10 11:08:18 -04:00
Mike Gorse e356769f33 Gail: Remove gail_cell_type_add_action_interface, as it no longer does anything 2010-09-10 09:46:34 -04:00
Mike Gorse da0975d5f2 Gail: Take fill/page size into account when returning a range's maximum value 2010-09-10 06:09:41 -04:00
Kjartan Maraas 6460fb6b3e Updated Norwegian bokmål translation 2010-09-10 09:53:58 +02:00
Matthias Clasen e2a492cf80 Some more updates 2010-09-09 22:33:56 -04:00
Matthias Clasen 36437a635d Update potfiles 2010-09-09 22:17:27 -04:00
Matthias Clasen 149b84dacf Really stop exporting text-related variables 2010-09-09 22:11:36 -04:00
Matthias Clasen 95eb4a868e Remove GDK_DISPLAY() usage 2010-09-09 21:55:28 -04:00
Matthias Clasen 2a27c90479 Update NEWS for 2.90.7 2010-09-09 19:50:24 -04:00
Matthias Clasen 0dcaad3a85 Drop the gdk_display variable from gdk
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
2010-09-09 19:46:41 -04:00
Matthias Clasen 001d16cb87 Fix the docs build after GtkItem removal 2010-09-09 16:11:31 -04:00
Tristan Van Berkom a6a036ce22 Adding note to docs of gtk_widget_set_window()
gtk_widget_set_window() does not add a reference to the
owned window... this is an exception to most gtk_foo_set_bar()
functions where as it acts as if it were named gtk_widget_take_window().

Adding note to the docs to avoid people giving the window to the
widget and naturally proceeding to unref the window.
2010-09-10 03:25:21 +09:00
Benjamin Otte 6624da6393 widget: Fix SEGV when no focus widget exists 2010-09-09 18:10:04 +02:00
Benjamin Otte b0b8393f99 gail: Add missing include 2010-09-09 15:46:55 +02:00
Tor Lillqvist e748334327 Avoid potential DLL hijacking in Wintab code
Load Wintab32.dll from an absolute path. A proper Wintab32.dll, if
present, should be in the Windows system directory, so load it from
there.
2010-09-09 15:44:12 +03:00
Tor Lillqvist 7464a9ca08 Use accessor functions 2010-09-09 15:02:33 +03:00
Tor Lillqvist 0c662ecb9a Fix gail build 2010-09-09 15:01:36 +03:00
Tor Lillqvist ceca2ff10c Adapt to the GDK_KEY changes 2010-09-09 14:35:20 +03:00
Tristan Van Berkom 73ea777c33 Fixed GtkTextView & GtkIconView to consult it's true previous size request
Fixed issues in my previous patch for bug 626939 removing GtkRequisition
cache: these widgets monitor the previous requested size and decide whether
to queue a resize when the content changes based on it's prior request.
2010-09-09 17:19:18 +09:00
Tristan Van Berkom 843be48572 Moved GtkSizeRequest cache to GtkWidget->priv
Now that we have a private data installed directly on
the GtkWidget instance it makes no sense to cache the size
requests on widget qdata. This change will generally make
GTK+ memory less fragmented as well as significantly speed
up the size request process.
2010-09-09 17:19:18 +09:00
Tor Lillqvist f76fddb8a7 Use accessor functions in Win32-only code 2010-09-09 11:09:55 +03:00
Tor Lillqvist dd36afc207 Don't use the same name for a function that used to be a variable
Rename the gtk_major_version() etc functions I introduced yesterday to
start with gtk_get. Avoids misleading results in client programs whose
developers that don't notice the change or the compiler warnings, and
when recompiling against gtk3 then use the function addresses as the
version numbers.
2010-09-09 11:06:26 +03:00
Matthias Clasen 91d0728dfa Fix build of gail after GtkItem removal 2010-09-09 00:51:08 -04:00
Matthias Clasen 3bd93e5bfd Remove GtkItem
With the demise of GtkList and GtkTree, it has GtkMenuItem as sole
derived class, and is not really adding any value as a separate class.
Its few useful features have been merged into GtkMenuItem.

Bug 629104
2010-09-08 23:38:09 -04:00
Javier Jardón 72ac2175e2 gtk/gtkhandlebox.c: Do not use gdk_window_get_deskrelative_origin()
This completes commit bd277fad50
2010-09-09 02:26:43 +02:00
Colin Walters e08c43faf4 porting guide: Update to mention GDK_KEY_ transition 2010-09-08 18:51:44 -04:00
Colin Walters 913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Colin Walters 03c19e37af gdk: Update gdkkeysyms.h
In preparation for adding a namespace prefix for introspection.
2010-09-08 18:51:44 -04:00
Javier Jardón bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Tor Lillqvist 3dda0adf76 Drop GDK_DEBUG_GC and _IMAGE as GDK doesn't do that any more 2010-09-09 01:09:49 +03:00
Mike Gorse 8fb5bc2583 Remove a duplicate variable
Bug#629110: gtk_spinner_accessible_get_type always returns null
2010-09-08 17:55:28 -04:00
Javier Jardón 1b0d2fcd51 Use G_CALLBACK() instead deprecated GTK_SIGNAL_FUNC() 2010-09-08 23:42:25 +02:00
Javier Jardón 016093d007 docs: Remove GtkFileSelection deprecated docs 2010-09-08 22:58:03 +02:00
Javier Jardón a76d198508 GtkWidget: Move public members to private structure 2010-09-08 21:28:16 +02:00
Javier Jardón efaed1b8f1 gtk/gtknotebook.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón f8cfb895ed gtk/gtkarrow.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón d9e7680735 gtk/gtkpathbar.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón a338d5dea5 gtk/gtkruler.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón e4dc454f59 gtk/gtkseparator.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón 50ef420378 gtk/gtkhandlebox.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón 89e8f79f07 gtk/gtkiconview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón a48d28848e gtk/gtkimage.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón ec2f2c3daf gtk/gtkmenu.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 0993bc4d1c gtk/gtkmisc.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 29044f0f0e gtk/gtkspinbutton.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 5533264958 gtk/gtktextview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón d05d713068 gtk/gtktreeview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 2d0a655201 gtk/gtkwindow.c: Fix warning
Cast to GtkSizeRequest

This was added in
commit b654afcb48
2010-09-08 21:13:03 +02:00
Tor Lillqvist 87141cf4c8 Get rid of the rest of variables exported from libgtk
Especially the gtk_*_type ones in gtktexttypes.h were mentioned in
gtk.symbols presumably by accident. That header isn't even installed,
so no way can they be supposed to be public.

gtk_text_attr_appearance_type is from the installed but "semi-private"
gtktextlayout.h, so drop that one too from gtk.symbols for now.

The use of gtk_text_unknown_char_utf8 is bit of a mess. Code in a few
files knew implicitly that it is three bytes. Define a symbolic name
for the length of it instead. Add an exported function
gtk_text_unknown_char_utf8_gtk_tests_only() that returns a pointer to
it just for the sake of gtk/tests/textbuffer.c. Prefix the variable
with an underscore.

I doubt the usefulness of the test_utf8() in textbuffer.c. If it could
be dropped, gtk_text_unknown_char_utf8_gtk_tests_only() could be
dropped, too.
2010-09-08 21:31:34 +03:00
Tor Lillqvist 801875b805 Replace gtk_debug_flags with getter and setter functions
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
2010-09-08 21:31:34 +03:00
Tor Lillqvist 2ab562a6f7 Remove also the docs for the gdk_threads_mutex variable 2010-09-08 21:31:33 +03:00
Tor Lillqvist cb24bcc613 Turn the gtk version and age variables into functions
Having variables exported from a DLL is slightly painful and
potentially error-prone on Windows, so let's try get rid of them now
when we can. Starting with these.
2010-09-08 21:31:33 +03:00
Javier Jardón b654afcb48 gtk/gtkwindow.c: Use gtk_size_request_get_size() instead gtk_widget_get_requisition() 2010-09-08 19:40:51 +02:00
Tristan Van Berkom 9934007420 Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.

In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.

This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
2010-09-08 18:50:24 +02:00
Javier Jardón 4e6a665e61 tests: Use gtk_widget_set_size_request() instead gtk_widget_set_usize() 2010-09-08 18:39:36 +02:00
Javier Jardón bc366cef52 gtknotebook: Do not mention deprecated API 2010-09-08 17:46:11 +02:00
Javier Jardón eb81216e32 demos: Do not use deprecated API 2010-09-08 17:45:51 +02:00
Javier Jardón 4a5e0a35b9 gtksocket: Remove mention to gtk_socket_steal() deprecated function 2010-09-08 17:14:37 +02:00
Javier Jardón ca3348f8f1 Do not use deprecated API in docs and examples
gtk_calendar_display_options() was deprecated and removed. Use
gtk_calendar_set_display_options() instead
2010-09-08 17:10:37 +02:00
Tor Lillqvist 3963d5aa76 Remove variables from the platform-independent GDK API
gdk_threads_mutex, gdk_threads_lock and gdk_threads_unlock are removed
from public API. gdk_threads_mutex was deprecated already. Instead of
using gdk_threads_lock and _unlock one was presumably supposed to use
the GDK_THREADS_ENTER and _LEAVE macros, which now simply call the
corresponding gdk_threads_enter() and _leave() functions.

Remove he dllimport/dllexport ugliness for GDK for Windows.

There is still a gdk_display variable being exported by the X11
backend.
2010-09-08 15:59:09 +03:00
Havoc Pennington 1812b001f7 Add padding and alignment tests to testadjustsize.c 2010-09-07 22:05:05 -04:00
Havoc Pennington c440a6760e Add padding and alignment properties to GtkWidget
h-align = START,END,CENTER,FILL
v-align = START,END,CENTER,FILL
padding-left,right,top,bottom,all-sides

These should obsolete all such similar properties on
layout containers, GtkMisc, GtkAlignment, GtkContainer::border-width

Padding is outside the size request.
If padding were not outside the set_size_request() it would not work the
same way as container-supplied (child property) padding.

Conceptually set_size_request() forces the value from the subclass
(the original unadjusted request) and then we go on to adjust
the request further by adding the padding.

To reflect this, we'll probably rename padding to margin
(and squash that back with this patch).
2010-09-07 22:04:59 -04:00
Havoc Pennington 86e475b843 GtkButton: let GtkContainer handle border width 2010-09-07 21:49:19 -04:00
Havoc Pennington aa53f37d45 add gtk_container_class_handle_border_width() so subclasses can ignore border_width
A subclass calls gtk_container_class_handle_border_width()
in its class_init

This marks the subclass as expecting GtkContainer to deal with
border width automatically, which GtkContainer then does.
2010-09-07 21:49:19 -04:00
Havoc Pennington 5c09e9e727 Add testadjustsize test, to test new adjust size methods and related features
This will test size adjust, and interactions with other padding and border
2010-09-07 21:49:19 -04:00
Havoc Pennington 034a436d38 GtkWidget: add adjust_size_request adjust_size_allocation virtual funcs
Use these new methods to handle set_size_request (aka aux_info)
inside gtkwidget.c, instead of having external code mess with it.

The virtual functions can be used for other purposes in the
future. For example, GtkContainer::border_width could be
automatically implemented for all container subclasses.
2010-09-07 21:49:19 -04:00
Havoc Pennington 8c914ce4cc Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
Did not update uses in other files because the plan is to
get rid of those other uses anyhow. So don't want to make
this function available in the header.
2010-09-07 21:49:19 -04:00
Havoc Pennington b487f4d181 add _gtk_widget_get_aux_info_or_defaults()
This is better than peeking aux info then testing != NULL
in several ways:
- it returns const aux info so if we don't create we can't write
- it ensures that the default we assume if aux_info is NULL is
  the same as the default we set if we've created the aux info
- it avoids typing in != NULL checks
2010-09-07 21:49:09 -04:00
Havoc Pennington 6a5b0fa2b7 Fix more SizeRequest implementations to avoid recursive calls to wrapper API
GtkFrame, GtkComboBox, GtkExpander, GtkMenu, GtkWrapBox

These are all the examples I could find so far.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
Havoc Pennington dcdf3da06b Warn about recursively calling size req wrappers on the same object and orientation
We are not re-entrant and there is no reason for widgets to
do this, most likely they'll just get unexpected bugs because
the wrappers may modify the request.

Computing the request should logically rely only on the
widget itself, not on any adjustments caused by set_size_request,
size groups, and so forth.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
Havoc Pennington e2b03a9b96 default impls of width_for_height,hfw should chain directly not use wrapper API
In GtkBin and GtkWidget we tried to provide handy defaults that
call get_width if there's no get_width_for_height and
get_height for get_height_for_width.

However, they used the wrapper API on GtkSizeRequest instead of
chaining directly to the other method implementation.

This could result in all kinds of surprising behavior, for example,
get_width_for_height() would now already include the effects of set_size_request().

If nothing else it's inefficient. But it's just conceptually wrong,
because to chain to another implementation, we should call the other
implementation, not call a wrapper around the other implementation
(when we're already inside a previous invocation of the wrapper,
i.e. compute_size_for_orientation() ends up reinvoking itself
in the same orientation on the same object which it pretty
likely isn't intending to do)

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
Colin Walters 319bc22c5c gtk.symbols: Update expected ABI 2010-09-07 14:17:10 -04:00
Owen W. Taylor d04e557370 Fix annotations for gdk_window_get_device_position()
Add (out) and (transfer none) as appropriate
2010-09-07 14:03:18 -04:00
John (J5) Palmieri c78a23bdca add annotations for tranfer and scope so that methods are exported by GI 2010-09-07 13:50:40 -04:00
John (J5) Palmieri eeaf576316 add array annotation to gtk_builder_add_objects_from_string 2010-09-07 12:06:29 -04:00
John (J5) Palmieri 8a210673fb add gtk_radio_button_join_group method for bindings
* this mirrors the committed change for gtk_radio_action_join_group in
  commit 85b53969b2
* Due to object ownership issues it is impossible to correctly use
  get_group/set_group from a GI binding
* join_group is safer because at the binding level it works with individual
  GtkRadioButton objects and not with the list of objects that gets
  modified in the library

https://bugzilla.gnome.org/show_bug.cgi?id=628935
2010-09-07 10:41:40 -04:00
Tristan Van Berkom 278957a5a4 Removed x/y/x_set/y_set from GtkWidgetAuxInfo
These members of GtkWidgetAuxData can no longer be set after
the removal of deprecated gtk_widget_set_uposition(), now removed
these members completely and removed the access to them from
gtk_widget_size_allocate().
2010-09-07 16:21:44 +09:00
Tristan Van Berkom d5278b5994 Removed _gtk_window_reposition()
_gtk_window_reposition() was only some extra confusing code, internally
it only calls the public API gtk_window_move()... replaced calls to
_gtk_window_reposition() with direct calls to gtk_window_move() and
removed the redundant internal API (probably there only for some historical
reason).
2010-09-07 15:45:15 +09:00
Havoc Pennington c50db9c208 Use a bitfield for Widget::private_flags, ::state, ::saved_state
This recovers 10 bits, since state and saved_state as uint8 both
wasted 5 bits. Now we can add 10 more flags.

Also, a possible future patch could just do 1-bit bitfields
for the private flags instead of using manual bit twiddling.

https://bugzilla.gnome.org/show_bug.cgi?id=628884
2010-09-07 00:13:11 -04:00
Matthias Clasen d5c2cb7bcb Avoid segfault on xkbless systems
This was reported in bug 628932 to cause problems on VNC.
2010-09-07 00:10:26 -04:00
Duarte Loreto 87b192773c Updated Portuguese translation 2010-09-07 00:51:47 +01:00
Klemen Košir fc5b39a4b8 Updated Slovenian translation 2010-09-06 16:47:25 +02:00
Baurzhan Muftakhidinov 134f9774dd Updated Kazakh translation 2010-09-06 10:29:49 +06:00
Matthias Clasen 3c5f9fd1a2 Remove use of ::has-separator property 2010-09-06 00:26:17 -04:00
Matthias Clasen 2f966e8418 Remove some unused enums
The GtkAnchorType and GtkVisibility enums are not used anywhere,
so remove them.
2010-09-05 23:55:47 -04:00
Havoc Pennington 88a90b8abb Warn if a widget requests minimum size > natural size
Since this makes no sense and there's no reason we should
have to check for it elsewhere just in case some widget is
busted.

https://bugzilla.gnome.org/show_bug.cgi?id=628808
2010-09-05 21:46:22 -04:00
Havoc Pennington d7d940c71e Add more "reserved for expansion" fields to GtkWidgetClass
Only 3 were left. 3.x cycle may need more.

https://bugzilla.gnome.org/show_bug.cgi?id=628807
2010-09-05 21:42:35 -04:00
Claude Paroz 956a3f53e1 Updated French translation 2010-09-04 23:21:19 +02:00
Murray Cumming 08ddea5069 GtkStatusIcon: Remove get/set_blinking() declarations from header.
This was apparently forgotten in
commit 18b47b6cd0 .
2010-09-04 13:18:09 +02:00
Martin Schlemmer e6da33a302 MS Windows engine: draw elements in the right place.
Work in progress, still remains to be solved the problem of clipping.
2010-09-03 22:19:39 +02:00
Matej Urbančič 3b63ef0ac6 Updated Slovenian translation 2010-09-03 19:16:38 +02:00
Matthew Barnes bf3b5f785e Don't leak display name
Bug 628656 - _gdk_windowing_get_startup_notify_id memory leak

get_display_name() returns a newly allocated string, which was being fed
directory info a g_strdup_printf() call.
2010-09-03 12:48:50 -04:00
Benjamin Otte d8f3a162c8 style: Use gtk_widget_get_state() for the entry background
New code sets the entry background to GTK_STATE_ACTIVE when it has focus
and the active color in the default theme looks rather bad.
2010-09-03 17:14:17 +02:00
Mattias Põldaru 7e78999034 [l10n] Updated Estonian translation 2010-09-03 18:06:48 +03:00
Benjamin Otte 78ccc74879 entry: Use the same state for the flat box of text area and icons 2010-09-03 17:01:06 +02:00
Benjamin Otte 3fdb4f6069 x11: Unused variable 2010-09-03 13:39:24 +02:00
Benjamin Otte 9c2eca5b06 range: Unused variable 2010-09-03 13:39:10 +02:00
Benjamin Otte 3685db091d window: Use brackets to silence gcc 2010-09-03 13:38:55 +02:00
Benjamin Otte fc46f2ca2f tests: Remove all code relating to the blink menu item 2010-09-03 13:38:29 +02:00
Matthias Clasen 1be5f91491 Document --disable-Bsymbolic option 2010-09-02 22:56:41 -04:00
Matthias Clasen d095448be3 Remove unused --disable-visibility option 2010-09-02 22:56:15 -04:00
Tor Lillqvist f42814168c Just use TrackMouseEvent directly
TrackMouseEvent is present in user32.dll in all Windows versions we
support. No need to look it up dynamically. No need to fallback to
_TrackMouseEvent from comctrl32.dll.
2010-09-03 00:30:56 +03:00
Colin Walters 00ce32d940 gtk-demo: Drop use of GTK_DIALOG_NO_SEPARATOR
Commit d433a60611 dropped this API.
2010-09-02 16:48:45 -04:00
Klemen Košir 6aa846cc4d Updated Slovenian translation 2010-09-02 18:24:32 +02:00
Fridrich Štrba 03b6a9b6a0 Oops, make the MS Windows theme really compile. 2010-09-02 15:39:19 +02:00
Matthias Clasen 18b47b6cd0 Remove blinking from status icons
This feature was just a bad idea.
2010-09-02 09:37:06 -04:00
Matthias Clasen 46f15e7d68 Adapt docs to dialog api changes 2010-09-02 09:35:50 -04:00
Matthias Clasen 76b21033f9 Adapt tests to dialog api change 2010-09-02 09:31:54 -04:00
Matthias Clasen d433a60611 Remove separators from dialogs
It seems more reasonable to remove this feature than to keep fighting
off every separator that pops up by accident in a dialog.
2010-09-02 09:14:20 -04:00
Fridrich Štrba 97cd2500c3 Make the MS Windows engine compile again.
Nevertheless, it is not working and needs a lot of fixing before
it can be useful.
2010-09-02 15:04:14 +02:00
Matthias Clasen a60a933ca6 Update docs or GtkProgressBar api changes 2010-09-02 08:59:27 -04:00
Matthias Clasen ece148eec0 Remove ::state-hint use
This use of the property was overlooked when it was removed.
We now always behave as if state-hint == TRUE.
2010-09-02 08:59:27 -04:00
Matthias Clasen 55d5d3679e Table gymnastics 2010-09-02 08:59:26 -04:00
Tor Lillqvist 2994fa11fb Avoid potential DLL hijacking in ms-windows theme engine
Load uxtheme.dll from an absolute path. A proper uxtheme.dll, if
present, will always be in the Windows system directory, so load it
from there.
2010-09-02 14:45:59 +03:00
Fridrich Štrba e78851b928 Adapt to progressbar api change 2010-09-02 10:24:34 +02:00
Fridrich Štrba 31b709d08a Export one needed symbol 2010-09-02 10:24:34 +02:00
Tristan Van Berkom 68568cff66 Enhanced/Simplified GtkWrapBox api as per Havoc's comments.
Made an enum GtkWrapBoxPacking for the expand/fill horizontal/vertical
boolean options... changed xpadding/ypadding to be horizontal-padding
and vertical-padding for a more consistent api and better readablility.
2010-09-02 15:36:36 +09:00
Tristan Van Berkom c9ccc7551b Some api changes for GtkWrapBox
Ammended documentation for GTK_WRAP_BOX_SPREAD_EVEN and renamed
GTK_WRAP_BOX_SPREAD_BEGIN -> GTK_WRAP_BOX_SPREAD_START.
2010-09-02 14:22:55 +09:00
Tristan Van Berkom f2279d5e51 Fixed GtkNotebook to not consult GtkWidget->requisition directly
GtkNotebook was filling widget->requisition directly at "size-request"
time instead of filling in the *requsition argument, also (more importantly)
at size_allocate time GtkNotebook was consulting the action widget's
widget->requisition directly instead of safely calling
gtk_widget_get_child_requisition(). This commit closes bgo #628068.
2010-09-02 13:50:27 +09:00
Matthias Clasen 42a90aa00c Add information about progressbar migration
Add a section to the migration guide about GtkProgressBar.
Also, actually include the wrap box docs.
2010-09-02 00:05:32 -04:00
Matthias Clasen 6b5672c199 Remove now unused GtkProgressBarOrientation enum 2010-09-01 23:30:21 -04:00
Matthias Clasen 0ff6aedca0 Convert GtkCellRendererProgress to a GtkOrientable
And add an inverted property to it, too.
2010-09-01 23:27:00 -04:00
Matthias Clasen 3302f22da2 Adapt testgtk progressbar test to api changes 2010-09-01 23:26:19 -04:00
Matthias Clasen 4230f7998b Make GtkProgressBar implement GtkOrientable
This also means that gtk_progress_bar_[sg]et_orientation are
gone.
2010-09-01 23:25:22 -04:00
Matthias Clasen c3a19a4a14 Split the GtkProgressBar::orientation property
We splict the orientation property into a GtkOrientation and a
'inverted' boolean, the same way that GtkRange is set up.
2010-09-01 23:24:20 -04:00
Matthias Clasen e4af3782d3 Rename GtkIconView::orientation property
Rename the ::orientation property of GtkIconView to item-orientation,
which is both clearer and avoids the conflict with the orientation
property of GtkOrientable implementations.
2010-09-01 23:03:48 -04:00
Matthias Clasen 1956cf8d28 Remove GtkRange::activate-slider
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 22:09:44 -04:00
Matthias Clasen d28af9cbb9 Remove GtkRange::stepper-position-details
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 21:48:44 -04:00
Matthias Clasen 658f99b8ee Remove GtkRange::trough-side-details
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 21:30:47 -04:00
Matthias Clasen 095fb1afe4 Remove GtkTreeView::row-ending-details
This was a style property to let theme engines 'opt-in' to more
    correct behaviour while maintaining compatibility with existing
    themes. GTK+ 3 engines are expected to handle the more correct
    behaviour.
2010-09-01 20:58:39 -04:00
Matthias Clasen 399580f9e1 Remove GtkEntry::state-hint
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 20:21:21 -04:00
Matthias Clasen 299454b7ed Update NEWS for 2.90.7 2010-09-01 20:09:10 -04:00
Matthias Clasen 15ea566813 Wrap box assimilation
Some coding style cleanups, rename Priv to Private, add docs
2010-09-01 20:03:30 -04:00
Matthias Clasen 7670b13d19 Update GtkButtonBox docs 2010-09-01 19:15:59 -04:00
Javier Jardón 6e5d65c9af gtkscale: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 5484211c90 gtktexttagtable: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 7eadf45888 gtktypeutils: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón a47e5483b6 gtkimcontextsimple: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 3a752e03a8 gtkimmulticontext: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Colin Walters 787df491f3 Add correct namespace prefix to ColorSelectionPrivate
gobject-introspection is now more strict about garbage in public headers.
2010-09-01 13:16:37 -04:00
Carl-Anton Ingmarsson 38fad43129 docs: Further fix GtkStock documentation
Some icons were left out from the
commit 9688665334

https://bugzilla.gnome.org/show_bug.cgi?id=628308

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-09-01 17:43:59 +02:00
Stefan Kost 9074f74c6f container: use priv in last commit
container->focus_child to container->priv->focus_child
2010-09-01 17:33:33 +03:00
Stefan Kost 94420f7110 widget: more details on gtk_widget_grab_focus docs
Tell that widget needs to be mapped and realized.
2010-09-01 16:59:00 +03:00
Stefan Kost 267a2156d8 container: clarify the docs
Hightlight more that focus_child is a container internal thing and suggest
what application developers most likely were looking for instead.
2010-09-01 16:59:00 +03:00
Stefan Kost b00b1c33a3 container: don't leak the focus_child ref count
gtk_conatiner_set_focus_child() takes a ref. Release the ref in _destroy().
Fixes #414712.
2010-09-01 16:59:00 +03:00
Matthias Clasen 9688665334 Fix GtkStock documentation
After the big icon rename, all the links in the docs have to
be updated, and we need to copy the right icons.
2010-09-01 00:14:45 -04:00
Colin Walters b04b1b2e84 introspection: Update to new scanner API
* Add --warn-all
* Drop unnecessary  of --strip-prefix; for GdkX11, use --symbol-prefix

https://bugzilla.gnome.org/show_bug.cgi?id=628160
2010-08-31 16:21:08 -04:00
Fridrich Štrba 5032cdf88f Porting MS Windows theme engine to cairo - Part 1: stippling 2010-08-31 18:05:41 +02:00
Fridrich Štrba 78dc2debc0 Porting the MS Windows theme engine to cairo - Part 2 rectangle and line drawing 2010-08-31 18:05:41 +02:00
Dirgita 34c6ea0307 Updated Indonesian translation 2010-08-31 21:38:52 +07:00
Dirgita 1810943d5d Updated Indonesian translation 2010-08-31 21:34:05 +07:00
Javier Jardón 213f8e2f1b gtk/gtkwindow: use accessor functions to access GtkWidget 2010-08-31 02:51:36 +02:00
Javier Jardón 1a980d0be6 gtk/gtkplug.c: Use accessor functions to access GtkWindow 2010-08-31 02:51:36 +02:00
Javier Jardón 304b1a1f56 Added _gtk_widget_get_wmclass() internal function
Needed by GtkPlug
2010-08-31 02:51:36 +02:00
Gabor Kelemen 6250627d9e Updated Hungarian translation 2010-08-31 02:28:25 +02:00
Gabor Kelemen 7879d5af11 Updated Hungarian translation 2010-08-31 02:26:03 +02:00
Javier Jardón cc06f3dde6 GtkScrolledWindow: move public members to private structure 2010-08-31 01:34:02 +02:00
Javier Jardón 8da741f955 Gail: use accessor functions to access GtkScrolledWindow 2010-08-31 01:34:02 +02:00
Szilárd Pfeiffer d8a90be370 Fixed minimum increment calculation of GailScaleButton.
Also implemented to use the adjustment to determine the current, minimum,
maximum values and mimimum increment just as the other widgets which have
adjustment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=626710
2010-08-30 22:39:11 +02:00
Martin Schlemmer e14560cf1e [win32] Properly draw the menu separator for Windows Vista/7.
Also adds the bits for transparency.
2010-08-30 20:05:09 +02:00
Martin Schlemmer 8476d22dea [win32] Use pango_win32_font_description_from_logfontw() to get
the system font, instead of the code duplication.
2010-08-30 20:01:41 +02:00
Martin Schlemmer 04e241fd85 [win32] Fix some warnings related to type differences and unused variables 2010-08-30 19:58:19 +02:00
Tor Lillqvist 4491bdbb9d Drop Win32 DLL ABI compatibility cruft
No need for that any longer as we are changing DLL name.
2010-08-30 14:57:48 +03:00
Tristan Van Berkom 972f617b77 Fixed GtkToolPalette realize() vfunc.
It seems with latest GSEAL work for widget->window access a
call to gtk_widget_set_window() was missed (added the window
assignment and now the palette shows up in Glade again).
2010-08-30 18:25:14 +09:00
Tristan Van Berkom bbf38a8ebd Fixing email address in copyright header for testwrapbox test. 2010-08-30 18:24:41 +09:00
Philip Withnall ba158a24fe Miscellaneous property string fixes 2010-08-29 19:00:14 +01:00
Szilárd Pfeiffer 86851b7ad3 modules/other/gail/gailtogglebutton.c: Add/remove indeterminate state
GailToggleButton does not set/unset ATK_STATE_INDETERMINATE according to the
value of GtkToggleButton's inconsistent property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=626537
2010-08-29 19:21:05 +02:00
Javier Jardón f84707d6f9 Add gtk_calendar_day_is_marked() function
The marked state of calendar day is not accessible

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627028
2010-08-29 19:14:24 +02:00
Daiki Ueno 6afa615690 Fix typo in GtkIMContextClass doc. 2010-08-29 19:01:30 +02:00
Милош Поповић a026b8227c Updated Serbian translation 2010-08-29 20:14:16 +02:00
Tor Lillqvist 87bf99dcc5 Fix Win32 build 2010-08-29 12:40:56 +03:00
Matthias Clasen 8d36170b8d Remove deprecated GTK_SELECTION_EXTENDED selection mode 2010-08-28 22:42:59 -04:00
Matthias Clasen 29aa3818a4 Remove deprecated text and text_length field in GtkEntry
These fields have been superseded by GtkEntryBuffer.
2010-08-28 22:27:36 -04:00
Matthias Clasen af8539bf11 Move deprectated menu enumerations to a private header
The GtkSubmenuDirection and GtkSubmenuPlacement enumerations
have been deprecated as public API for a while, but are still used
internally in the menu code. Move them to a private header. This
also prevents to generation of GObject boilerplate for these enums.
2010-08-28 21:24:11 -04:00
Matthias Clasen eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Matthias Clasen 00438fea3d Declare the GtkWidget::window-dragging style property as readonly
This is how we generally declare style properties, and declaring
this one r/w was just an oversight.
2010-08-28 20:08:14 -04:00
Matthias Clasen 5d6b21e7b2 Remove long-deprecated page-horizontally signal
This signal has been superseded by GTK_MOVEMENT_HORIZONTAL_PAGES
long ago. This breaks the GtkTextView ABI.
2010-08-28 19:26:42 -04:00
Matthias Clasen d2d344a531 Remove a workaround for old toolbar api
The old, deprecated toolbar api has been removed, so this workaround
is no longer necessary.
2010-08-28 19:11:23 -04:00
Matthias Clasen 6dd4f32f37 Remove deprecated GTK_CALENDAR_WEEK_START_MONDAY option
This has been deprecated and ignored for a long time.
2010-08-28 19:09:21 -04:00
Matthias Clasen d45d970144 Remove deprecated 'shadow' properties in GtkFrame and GtkHandleBox 2010-08-28 17:20:53 -04:00
Philip Withnall f733ab0e75 Update British English translation 2010-08-28 15:58:56 +01:00
Yaron Shahrabani 34a8213b0f Updated Hebrew translation. 2010-08-28 10:27:28 +03:00
262 changed files with 28469 additions and 27329 deletions
+110
View File
@@ -1,3 +1,113 @@
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
==============================================
+3 -12
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], [7])
m4_define([gtk_micro_version], [8])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -243,10 +243,6 @@ 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])])
@@ -284,11 +280,6 @@ 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])
@@ -1543,7 +1534,7 @@ fi
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.9.0])
GOBJECT_INTROSPECTION_CHECK([0.9.5])
##################################################
# Checks for gtk-doc and docbook-tools
@@ -1746,4 +1737,4 @@ perf/Makefile
AC_OUTPUT
echo "configuration:
target: $gdktarget"
target: $gdktarget"
+5 -1
View File
@@ -124,7 +124,11 @@ 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", PACKAGE_VERSION,
"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 ()),
"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),
GTK_DIALOG_NO_SEPARATOR,
0,
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_Return:
case GDK_KP_Enter:
case GDK_KEY_Return:
case GDK_KEY_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_orientation (GTK_ICON_VIEW (icon_view),
GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_item_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");
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
g_object_set (tag,
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
g_object_set (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,7 +1006,6 @@ 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
@@ -1077,7 +1076,6 @@ 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
+5 -6
View File
@@ -11,13 +11,12 @@ 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. <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.
header file.
</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_ rather than
XF86XK_ or XK_ (for older symbols).
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
than XF86XK_ or XK_ (for older symbols).
</para>
<para>
Key values can be converted into a string representation using
@@ -30,7 +29,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>
@@ -270,7 +269,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_".
but without the leading "GDK_KEY_".
</para>
@keyval: a key value.
-7
View File
@@ -300,13 +300,6 @@ 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/gtk-about.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-add.png \
$(top_srcdir)/gtk/stock-icons/24/help-about.png \
$(top_srcdir)/gtk/stock-icons/24/list-add.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-bold.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-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/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/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-connect.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-convert.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/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-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/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/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-index.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/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/20/gtk-no.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-ok.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-open.png \
$(top_srcdir)/gtk/stock-icons/24/document-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/gtk-paste.png \
$(top_srcdir)/gtk/stock-icons/24/edit-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.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/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-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/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/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-undelete-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-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/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/20/gtk-yes.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 \
$(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 \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/assistant.png \
+7 -11
View File
@@ -330,8 +330,8 @@ How to compile GTK+ itself
<arg>--enable-debug=[no|minimum|yes]</arg>
</group>
<group>
<arg>--disable-visibility</arg>
<arg>--enable-visibility</arg>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</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,15 +415,11 @@ How to compile GTK+ itself
</formalpara>
<formalpara>
<title><systemitem>--disable-visibility</systemitem> and
<systemitem>--enable-visibility</systemitem></title>
<title><systemitem>--disable-Bsymbolic</systemitem> and
<systemitem>--enable-Bsymbolic</systemitem></title>
<para>
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.
The option <systemitem>--disable-Bsymbolic</systemitem>
turns off the use of the -Bsymbolic-functions linker flag.
</para>
</formalpara>
+1 -1
View File
@@ -307,6 +307,7 @@ 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" />
@@ -368,7 +369,6 @@ 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" />
+44 -27
View File
@@ -594,6 +594,7 @@ 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>
@@ -898,9 +899,7 @@ 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
@@ -1612,8 +1611,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_orientation
gtk_icon_view_get_orientation
gtk_icon_view_set_item_orientation
gtk_icon_view_get_item_orientation
gtk_icon_view_set_columns
gtk_icon_view_get_columns
gtk_icon_view_set_item_width
@@ -1833,24 +1832,6 @@ 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>
@@ -2360,9 +2341,8 @@ gtk_progress_bar_new
gtk_progress_bar_pulse
gtk_progress_bar_set_fraction
gtk_progress_bar_get_fraction
GtkProgressBarOrientation
gtk_progress_bar_set_orientation
gtk_progress_bar_get_orientation
gtk_progress_bar_set_inverted
gtk_progress_bar_get_inverted
gtk_progress_bar_set_show_text
gtk_progress_bar_get_show_text
gtk_progress_bar_set_text
@@ -3070,8 +3050,6 @@ 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
@@ -4974,6 +4952,7 @@ GTK_IS_WIDGET_CLASS
GTK_WIDGET_GET_CLASS
GTK_TYPE_REQUISITION
<SUBSECTION Private>
GtkWidgetPrivate
gtk_widget_get_type
gtk_requisition_get_type
</SECTION>
@@ -5093,6 +5072,7 @@ GTK_IS_WINDOW_CLASS
GTK_WINDOW_GET_CLASS
<SUBSECTION Private>
GtkWindowPrivate
gtk_window_get_type
GtkWindowGeometryInfo
gtk_window_remove_embedded_xid
@@ -6360,3 +6340,40 @@ 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,7 +80,6 @@ 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
@@ -179,3 +178,4 @@ 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,6 +113,20 @@
</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>
@@ -380,6 +394,38 @@ 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,6 +7,8 @@ gtkcalendar.sgml
gtkcelleditable.sgml
gtkhbox.sgml
gtkiconview.sgml
gtkimcontextsimple.sgml
gtkimmulticontext.sgml
gtkmessagedialog.sgml
gtkobject.sgml
gtkorientable.sgml
@@ -21,6 +23,7 @@ gtkrecentchooserdialog.sgml
gtkrecentchoosermenu.sgml
gtkrecentchooserwidget.sgml
gtkrecentmanager.sgml
gtkscale.sgml
gtkscalebutton.sgml
gtkseparator.sgml
gtkseparatormenuitem.sgml
@@ -29,7 +32,9 @@ gtkstatusbar.sgml
gtkstyle.sgml
gtktesting.sgml
gtktextiter.sgml
gtktexttagtable.sgml
gtktoggleaction.sgml
gtktoolitem.sgml
gtktreednd.sgml
gtktypeutils.sgml
gtkwindow.sgml
-58
View File
@@ -22,64 +22,6 @@ 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
@@ -1,226 +0,0 @@
<!-- ##### 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:
@@ -1,55 +0,0 @@
<!-- ##### 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>
@@ -1,64 +0,0 @@
<!-- ##### 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
@@ -1,75 +0,0 @@
<!-- ##### 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
@@ -1,193 +0,0 @@
<!-- ##### 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:
@@ -1,125 +0,0 @@
<!-- ##### 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
@@ -1,51 +0,0 @@
<!-- ##### 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 (), xid, &root,
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 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 (), window,
rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 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 ();
disp = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
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 (), xid, &root,
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 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_Q, GDK_CONTROL_MASK,
gtk_widget_add_accelerator (button, "activate", accel_group, GDK_KEY_Q, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
return info;
+12 -20
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)
GTK_SIGNAL_FUNC (function)
G_CALLBACK (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_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
void gtk_calendar_set_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
</programlisting>
<para>The <literal>flags</literal> argument can be formed by combining either of the
@@ -5405,14 +5405,6 @@ 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
@@ -5678,7 +5670,7 @@ static void calendar_set_flags( CalendarData *calendar )
options = options + (1 &lt;&lt; i);
}
if (calendar-&gt;window)
gtk_calendar_display_options (GTK_CALENDAR (calendar-&gt;window), options);
gtk_calendar_set_display_options (GTK_CALENDAR (calendar-&gt;window), options);
}
static void calendar_toggle_flag( GtkWidget *toggle,
@@ -6153,7 +6145,7 @@ gint main( gint argc,
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
g_signal_connect (GTK_OBJECT (drawingarea), "event",
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
G_CALLBACK (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
@@ -7650,7 +7642,7 @@ the toolbar widget.</para>
"Closes this app", /* this button's tooltip */
"Private", /* tooltip private info */
iconw, /* icon widget */
GTK_SIGNAL_FUNC (delete_event), /* a signal */
G_CALLBACK (delete_event), /* a signal */
NULL);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
</programlisting>
@@ -7674,7 +7666,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 */
GTK_SIGNAL_FUNC (radio_event), /* signal */
G_CALLBACK (radio_event), /* signal */
toolbar); /* data for signal */
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
</programlisting>
@@ -7700,7 +7692,7 @@ tutorial).</para>
"Only texts in toolbar",
"Private",
iconw,
GTK_SIGNAL_FUNC (radio_event),
G_CALLBACK (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
@@ -7713,7 +7705,7 @@ tutorial).</para>
"Icons and text in toolbar",
"Private",
iconw,
GTK_SIGNAL_FUNC (radio_event),
G_CALLBACK (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
@@ -7734,7 +7726,7 @@ between them).</para>
"Toolbar with or without tips",
"Private",
iconw,
GTK_SIGNAL_FUNC (toggle_event),
G_CALLBACK (toggle_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tooltips_button), TRUE);
@@ -15073,10 +15065,10 @@ gtk_dial_set_adjustment (GtkDial *dial,
g_object_ref (GTK_OBJECT (dial-&gt;adjustment));
g_signal_connect (GTK_OBJECT (adjustment), "changed",
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
G_CALLBACK (gtk_dial_adjustment_changed),
(gpointer) dial);
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
G_CALLBACK (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_display_options (GTK_CALENDAR (calendar->window), options);
gtk_calendar_set_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",
GTK_SIGNAL_FUNC (destroy_window), (gpointer) window);
G_CALLBACK (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",
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
G_CALLBACK (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
+4 -3
View File
@@ -84,6 +84,7 @@ gdk_public_h_sources = \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
gdkkeysyms-compat.h \
gdkpango.h \
gdkpixbuf.h \
gdkpixmap.h \
@@ -171,13 +172,13 @@ libgdk_win32_3_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(src
if HAVE_INTROSPECTION
introspection_files = \
$(gdk_public_h_sources) \
$(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
$(gdk_c_sources) \
gdkenumtypes.c \
gdkenumtypes.h
Gdk-3.0.gir: $(gdktargetlib) Makefile
Gdk_3_0_gir_SCANNERFLAGS = --strip-prefix=Gdk
Gdk_3_0_gir_SCANNERFLAGS = --warn-all
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)
@@ -225,7 +226,7 @@ x11_introspection_files = \
x11/gdkx.h
GdkX11-3.0.gir: $(gdktargetlib) Gdk-3.0.gir Makefile
GdkX11_3_0_gir_SCANNERFLAGS = --strip-prefix=gdk_x11
GdkX11_3_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Gdk --symbol-prefix=gdk
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)
+9 -4
View File
@@ -63,6 +63,11 @@ 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},
@@ -71,9 +76,7 @@ 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},
@@ -384,13 +387,15 @@ gdk_init (int *argc, char ***argv)
void
gdk_threads_enter (void)
{
GDK_THREADS_ENTER ();
if (gdk_threads_lock)
(*gdk_threads_lock) ();
}
void
gdk_threads_leave (void)
{
GDK_THREADS_LEAVE ();
if (gdk_threads_unlock)
(*gdk_threads_unlock) ();
}
static void
+3 -20
View File
@@ -43,6 +43,7 @@
#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>
@@ -151,13 +152,6 @@ 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);
@@ -187,19 +181,8 @@ guint gdk_threads_add_timeout_seconds (guint interval,
GSourceFunc function,
gpointer data);
#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 */
#define GDK_THREADS_ENTER() gdk_threads_enter()
#define GDK_THREADS_LEAVE() gdk_threads_leave()
G_END_DECLS
-13
View File
@@ -587,7 +587,6 @@ 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
@@ -1092,15 +1091,3 @@ 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 to which the device belongs to"),
P_("Display 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 to which the device belongs to"),
P_("Device manager 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 to this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
* Associated pointer or keyboard with 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 to this device"),
P_("Associated pointer or keyboard with 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 cursor"),
P_("Whether the device has a cursor"),
P_("Whether there is a visible cursor following device motion"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
-1
View File
@@ -1445,7 +1445,6 @@ 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,7 +43,3 @@ 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;
+7 -9
View File
@@ -77,15 +77,13 @@ typedef enum {
GDK_DEBUG_XIM = 1 << 3,
GDK_DEBUG_NOGRABS = 1 << 4,
GDK_DEBUG_COLORMAP = 1 << 5,
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
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
} 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_VoidSymbol;
return GDK_KEY_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_a, #GDK_Enter, #GDK_F1, etc.
* Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc.
*
**/
void
@@ -149,101 +149,101 @@ gdk_keyval_convert_case (guint symbol,
switch (symbol >> 8)
{
case 0: /* Latin 1 */
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);
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);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
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);
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);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
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);
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);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
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);
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);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
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);
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);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
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);
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);
break;
}
File diff suppressed because it is too large Load Diff
+44 -6
View File
@@ -63,7 +63,10 @@ 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");
print OUT_GDKKEYSYMS<<EOF;
# 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;
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 2005, 2006, 2007, 2009 GNOME Foundation
@@ -84,6 +87,13 @@ print OUT_GDKKEYSYMS<<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
@@ -105,6 +115,19 @@ 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>)
{
@@ -119,9 +142,14 @@ while (<IN_KEYSYMDEF>)
$_ = $keysymelements[2];
die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ );
$keysymelements[1] =~ s/^XK_/GDK_/g;
my $element = $keysymelements[1];
my $binding = $element;
$binding =~ s/^XK_/GDK_KEY_/g;
my $compat_binding = $element;
$compat_binding =~ s/^XK_/GDK_/g;
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
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]);
}
close IN_KEYSYMDEF;
@@ -162,9 +190,14 @@ while (<IN_XF86KEYSYM>)
$_ = $keysymelements[2];
die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ );
$keysymelements[1] =~ s/^XF86XK_/GDK_/g;
my $element = $keysymelements[1];
my $binding = $element;
$binding =~ s/^XF86XK_/GDK_KEY_/g;
my $compat_binding = $element;
$compat_binding =~ s/^XF86XK_/GDK_/g;
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
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]);
}
close IN_XF86KEYSYM;
@@ -175,4 +208,9 @@ print OUT_GDKKEYSYMS<<EOF;
#endif /* __GDK_KEYSYMS_H__ */
EOF
printf "We just finished converting keysymdef.h to gdkkeysyms.h\nThank you\n";
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";
+2176 -2174
View File
File diff suppressed because it is too large Load Diff
-36
View File
@@ -368,41 +368,6 @@ 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,
@@ -876,7 +841,6 @@ 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,16 +38,6 @@
#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
+8 -55
View File
@@ -1381,7 +1381,6 @@ 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)
@@ -1683,7 +1682,6 @@ 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)
@@ -2018,7 +2016,6 @@ _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:
@@ -5445,15 +5442,15 @@ gdk_window_get_pointer (GdkWindow *window,
* gdk_window_get_device_position:
* @window: a #GdkWindow.
* @device: #GdkDevice to query to.
* @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.
* @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.
*
* Obtains the current device position and modifier state.
* The position is given in coordinates relative to the upper left
* corner of @window.
*
* Returns: The window underneath @device (as with
* Return value: (transfer none): The window underneath @device (as with
* gdk_display_get_window_at_device_position()), or %NULL if the
* window is not known to GDK.
*
@@ -7676,50 +7673,6 @@ 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
@@ -9869,10 +9822,10 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
{
toplevel_priv->synthesize_crossing_event_queued = TRUE;
g_idle_add_full (GDK_PRIORITY_EVENTS - 1,
do_synthesize_crossing_event,
g_object_ref (toplevel),
g_object_unref);
gdk_threads_add_idle_full (GDK_PRIORITY_EVENTS - 1,
do_synthesize_crossing_event,
g_object_ref (toplevel),
g_object_unref);
}
}
-9
View File
@@ -65,7 +65,6 @@ 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())
@@ -79,7 +78,6 @@ typedef enum
GDK_WINDOW_ROOT,
GDK_WINDOW_TOPLEVEL,
GDK_WINDOW_CHILD,
GDK_WINDOW_DIALOG,
GDK_WINDOW_TEMP,
GDK_WINDOW_FOREIGN,
GDK_WINDOW_OFFSCREEN
@@ -733,13 +731,6 @@ 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,9 +93,6 @@ 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,
+1 -12
View File
@@ -854,7 +854,6 @@ _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)
{
@@ -906,10 +905,9 @@ _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;
@@ -1832,14 +1830,6 @@ 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,
@@ -3059,7 +3049,6 @@ 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;
+24 -1
View File
@@ -33,6 +33,8 @@
#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)
@@ -376,6 +378,9 @@ _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;
@@ -387,7 +392,25 @@ _gdk_input_wintab_init_check (GdkDeviceManagerWin32 *device_manager)
if (_gdk_input_ignore_wintab)
return;
if ((wintab32 = LoadLibrary ("wintab32.dll")) == NULL)
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)
return;
if ((p_WTInfoA = (t_WTInfoA) GetProcAddress (wintab32, "WTInfoA")) == NULL)
+16 -37
View File
@@ -152,40 +152,19 @@ static void
track_mouse_event (DWORD dwFlags,
HWND hwnd)
{
typedef BOOL (WINAPI *PFN_TrackMouseEvent) (LPTRACKMOUSEEVENT);
static PFN_TrackMouseEvent p_TrackMouseEvent = NULL;
static gboolean once = FALSE;
TRACKMOUSEEVENT tme;
if (!once)
{
HMODULE user32;
HINSTANCE commctrl32;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = dwFlags;
tme.hwndTrack = hwnd;
tme.dwHoverTime = HOVER_DEFAULT; /* not used */
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));
}
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));
}
gulong
@@ -987,7 +966,7 @@ fill_key_event_string (GdkEvent *event)
*/
c = 0;
if (event->key.keyval != GDK_VoidSymbol)
if (event->key.keyval != GDK_KEY_VoidSymbol)
c = gdk_keyval_to_unicode (event->key.keyval);
if (c)
@@ -1024,13 +1003,13 @@ fill_key_event_string (GdkEvent *event)
if (event->key.string)
event->key.length = bytes_written;
}
else if (event->key.keyval == GDK_Escape)
else if (event->key.keyval == GDK_KEY_Escape)
{
event->key.length = 1;
event->key.string = g_strdup ("\033");
}
else if (event->key.keyval == GDK_Return ||
event->key.keyval == GDK_KP_Enter)
else if (event->key.keyval == GDK_KEY_Return ||
event->key.keyval == GDK_KEY_KP_Enter)
{
event->key.length = 1;
event->key.string = g_strdup ("\r");
@@ -2084,7 +2063,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_VoidSymbol;
event->key.keyval = GDK_KEY_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_Cancel; break;
*ksymp = GDK_KEY_Cancel; break;
case VK_BACK:
*ksymp = GDK_BackSpace; break;
*ksymp = GDK_KEY_BackSpace; break;
case VK_TAB:
if (shift & 0x1)
*ksymp = GDK_ISO_Left_Tab;
*ksymp = GDK_KEY_ISO_Left_Tab;
else
*ksymp = GDK_Tab;
*ksymp = GDK_KEY_Tab;
break;
case VK_CLEAR:
*ksymp = GDK_Clear; break;
*ksymp = GDK_KEY_Clear; break;
case VK_RETURN:
*ksymp = GDK_Return; break;
*ksymp = GDK_KEY_Return; break;
case VK_SHIFT:
case VK_LSHIFT:
*ksymp = GDK_Shift_L; break;
*ksymp = GDK_KEY_Shift_L; break;
case VK_CONTROL:
case VK_LCONTROL:
*ksymp = GDK_Control_L; break;
*ksymp = GDK_KEY_Control_L; break;
case VK_MENU:
case VK_LMENU:
*ksymp = GDK_Alt_L; break;
*ksymp = GDK_KEY_Alt_L; break;
case VK_PAUSE:
*ksymp = GDK_Pause; break;
*ksymp = GDK_KEY_Pause; break;
case VK_ESCAPE:
*ksymp = GDK_Escape; break;
*ksymp = GDK_KEY_Escape; break;
case VK_PRIOR:
*ksymp = GDK_Prior; break;
*ksymp = GDK_KEY_Prior; break;
case VK_NEXT:
*ksymp = GDK_Next; break;
*ksymp = GDK_KEY_Next; break;
case VK_END:
*ksymp = GDK_End; break;
*ksymp = GDK_KEY_End; break;
case VK_HOME:
*ksymp = GDK_Home; break;
*ksymp = GDK_KEY_Home; break;
case VK_LEFT:
*ksymp = GDK_Left; break;
*ksymp = GDK_KEY_Left; break;
case VK_UP:
*ksymp = GDK_Up; break;
*ksymp = GDK_KEY_Up; break;
case VK_RIGHT:
*ksymp = GDK_Right; break;
*ksymp = GDK_KEY_Right; break;
case VK_DOWN:
*ksymp = GDK_Down; break;
*ksymp = GDK_KEY_Down; break;
case VK_SELECT:
*ksymp = GDK_Select; break;
*ksymp = GDK_KEY_Select; break;
case VK_PRINT:
*ksymp = GDK_Print; break;
*ksymp = GDK_KEY_Print; break;
case VK_EXECUTE:
*ksymp = GDK_Execute; break;
*ksymp = GDK_KEY_Execute; break;
case VK_INSERT:
*ksymp = GDK_Insert; break;
*ksymp = GDK_KEY_Insert; break;
case VK_DELETE:
*ksymp = GDK_Delete; break;
*ksymp = GDK_KEY_Delete; break;
case VK_HELP:
*ksymp = GDK_Help; break;
*ksymp = GDK_KEY_Help; break;
case VK_LWIN:
*ksymp = GDK_Meta_L; break;
*ksymp = GDK_KEY_Meta_L; break;
case VK_RWIN:
*ksymp = GDK_Meta_R; break;
*ksymp = GDK_KEY_Meta_R; break;
case VK_APPS:
*ksymp = GDK_Menu; break;
*ksymp = GDK_KEY_Menu; break;
case VK_MULTIPLY:
*ksymp = GDK_KP_Multiply; break;
*ksymp = GDK_KEY_KP_Multiply; break;
case VK_ADD:
*ksymp = GDK_KP_Add; break;
*ksymp = GDK_KEY_KP_Add; break;
case VK_SEPARATOR:
*ksymp = GDK_KP_Separator; break;
*ksymp = GDK_KEY_KP_Separator; break;
case VK_SUBTRACT:
*ksymp = GDK_KP_Subtract; break;
*ksymp = GDK_KEY_KP_Subtract; break;
case VK_DIVIDE:
*ksymp = GDK_KP_Divide; break;
*ksymp = GDK_KEY_KP_Divide; break;
case VK_NUMPAD0:
*ksymp = GDK_KP_0; break;
*ksymp = GDK_KEY_KP_0; break;
case VK_NUMPAD1:
*ksymp = GDK_KP_1; break;
*ksymp = GDK_KEY_KP_1; break;
case VK_NUMPAD2:
*ksymp = GDK_KP_2; break;
*ksymp = GDK_KEY_KP_2; break;
case VK_NUMPAD3:
*ksymp = GDK_KP_3; break;
*ksymp = GDK_KEY_KP_3; break;
case VK_NUMPAD4:
*ksymp = GDK_KP_4; break;
*ksymp = GDK_KEY_KP_4; break;
case VK_NUMPAD5:
*ksymp = GDK_KP_5; break;
*ksymp = GDK_KEY_KP_5; break;
case VK_NUMPAD6:
*ksymp = GDK_KP_6; break;
*ksymp = GDK_KEY_KP_6; break;
case VK_NUMPAD7:
*ksymp = GDK_KP_7; break;
*ksymp = GDK_KEY_KP_7; break;
case VK_NUMPAD8:
*ksymp = GDK_KP_8; break;
*ksymp = GDK_KEY_KP_8; break;
case VK_NUMPAD9:
*ksymp = GDK_KP_9; break;
*ksymp = GDK_KEY_KP_9; break;
case VK_F1:
*ksymp = GDK_F1; break;
*ksymp = GDK_KEY_F1; break;
case VK_F2:
*ksymp = GDK_F2; break;
*ksymp = GDK_KEY_F2; break;
case VK_F3:
*ksymp = GDK_F3; break;
*ksymp = GDK_KEY_F3; break;
case VK_F4:
*ksymp = GDK_F4; break;
*ksymp = GDK_KEY_F4; break;
case VK_F5:
*ksymp = GDK_F5; break;
*ksymp = GDK_KEY_F5; break;
case VK_F6:
*ksymp = GDK_F6; break;
*ksymp = GDK_KEY_F6; break;
case VK_F7:
*ksymp = GDK_F7; break;
*ksymp = GDK_KEY_F7; break;
case VK_F8:
*ksymp = GDK_F8; break;
*ksymp = GDK_KEY_F8; break;
case VK_F9:
*ksymp = GDK_F9; break;
*ksymp = GDK_KEY_F9; break;
case VK_F10:
*ksymp = GDK_F10; break;
*ksymp = GDK_KEY_F10; break;
case VK_F11:
*ksymp = GDK_F11; break;
*ksymp = GDK_KEY_F11; break;
case VK_F12:
*ksymp = GDK_F12; break;
*ksymp = GDK_KEY_F12; break;
case VK_F13:
*ksymp = GDK_F13; break;
*ksymp = GDK_KEY_F13; break;
case VK_F14:
*ksymp = GDK_F14; break;
*ksymp = GDK_KEY_F14; break;
case VK_F15:
*ksymp = GDK_F15; break;
*ksymp = GDK_KEY_F15; break;
case VK_F16:
*ksymp = GDK_F16; break;
*ksymp = GDK_KEY_F16; break;
case VK_F17:
*ksymp = GDK_F17; break;
*ksymp = GDK_KEY_F17; break;
case VK_F18:
*ksymp = GDK_F18; break;
*ksymp = GDK_KEY_F18; break;
case VK_F19:
*ksymp = GDK_F19; break;
*ksymp = GDK_KEY_F19; break;
case VK_F20:
*ksymp = GDK_F20; break;
*ksymp = GDK_KEY_F20; break;
case VK_F21:
*ksymp = GDK_F21; break;
*ksymp = GDK_KEY_F21; break;
case VK_F22:
*ksymp = GDK_F22; break;
*ksymp = GDK_KEY_F22; break;
case VK_F23:
*ksymp = GDK_F23; break;
*ksymp = GDK_KEY_F23; break;
case VK_F24:
*ksymp = GDK_F24; break;
*ksymp = GDK_KEY_F24; break;
case VK_NUMLOCK:
*ksymp = GDK_Num_Lock; break;
*ksymp = GDK_KEY_Num_Lock; break;
case VK_SCROLL:
*ksymp = GDK_Scroll_Lock; break;
*ksymp = GDK_KEY_Scroll_Lock; break;
case VK_RSHIFT:
*ksymp = GDK_Shift_R; break;
*ksymp = GDK_KEY_Shift_R; break;
case VK_RCONTROL:
*ksymp = GDK_Control_R; break;
*ksymp = GDK_KEY_Control_R; break;
case VK_RMENU:
*ksymp = GDK_Alt_R; break;
*ksymp = GDK_KEY_Alt_R; break;
}
}
@@ -283,39 +283,39 @@ handle_dead (guint keysym,
switch (keysym)
{
case '"': /* 0x022 */
*ksymp = GDK_dead_diaeresis; break;
*ksymp = GDK_KEY_dead_diaeresis; break;
case '\'': /* 0x027 */
*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;
*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;
case 0x1000384: /* Greek tonos */
*ksymp = GDK_dead_acute; break;
case GDK_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_Greek_accentdieresis; break;
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_KEY_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_VoidSymbol;
keysym_tab[vk*4+3] = GDK_KEY_VoidSymbol;
else
{
gint shift;
@@ -434,7 +434,7 @@ update_keymap (void)
}
}
if (*ksymp == 0)
*ksymp = GDK_VoidSymbol;
*ksymp = GDK_KEY_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_VoidSymbol &&
if ((keysym_tab[vk*4 + 2] != GDK_KEY_VoidSymbol &&
keysym_tab[vk*4] != keysym_tab[vk*4 + 2]) ||
(keysym_tab[vk*4 + 3] != GDK_VoidSymbol &&
(keysym_tab[vk*4 + 3] != GDK_KEY_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_space &&
chars[0] <= GDK_asciitilde &&
if (chars[0] >= GDK_KEY_space &&
chars[0] <= GDK_KEY_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_VoidSymbol)
if (sym == GDK_KEY_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_VoidSymbol &&
keyvals[group*2] != GDK_VoidSymbol)
keyvals[group*2 + 1] == GDK_KEY_VoidSymbol &&
keyvals[group*2] != GDK_KEY_VoidSymbol)
{
shift_level = 0;
ignore_shift = TRUE;
}
if (group == 1 &&
keyvals[2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + shift_level] != GDK_VoidSymbol)
keyvals[2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + shift_level] != GDK_KEY_VoidSymbol)
{
group = 0;
ignore_group = TRUE;
}
if (keyvals[group *2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + 0] != GDK_VoidSymbol)
if (keyvals[group *2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + 0] != GDK_KEY_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_VoidSymbol ||
if (keyvals[group*2 + 1] == GDK_KEY_VoidSymbol ||
keyvals[group*2 + 0] == keyvals[group*2 + 1])
ignore_shift = TRUE;
if (keyvals[2 + shift_level] == GDK_VoidSymbol ||
if (keyvals[2 + shift_level] == GDK_KEY_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_VoidSymbol;
return tmp_keyval != GDK_KEY_VoidSymbol;
}
void
+3 -29
View File
@@ -308,7 +308,6 @@ 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;
@@ -401,17 +400,6 @@ 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) ||
@@ -492,9 +480,8 @@ _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);
@@ -554,7 +541,6 @@ _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. */
@@ -1061,8 +1047,7 @@ 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 ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
{
if (focus_on_map && private->accept_focus)
{
@@ -1399,7 +1384,6 @@ 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))
{
@@ -1504,8 +1488,7 @@ get_effective_window_decorations (GdkWindow *window,
if (gdk_window_get_decorations (window, decoration))
return TRUE;
if (((GdkWindowObject *) window)->window_type != GDK_WINDOW_TOPLEVEL &&
((GdkWindowObject *) window)->window_type != GDK_WINDOW_DIALOG)
if (((GdkWindowObject *) window)->window_type != GDK_WINDOW_TOPLEVEL)
{
return FALSE;
}
@@ -1976,14 +1959,6 @@ 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)
@@ -3544,7 +3519,6 @@ 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;
+5 -1
View File
@@ -311,7 +311,11 @@ _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)
description = g_strdup_printf (_("Opening %s"), get_display_name (files->data));
{
gchar *display_name = get_display_name (files->data);
description = g_strdup_printf (_("Opening %s"), display_name);
g_free (display_name);
}
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_VoidSymbol;
event->key.keyval = GDK_KEY_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_VoidSymbol)
if (event->key.keyval != GDK_KEY_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_Escape)
else if (event->key.keyval == GDK_KEY_Escape)
{
event->key.length = 1;
event->key.string = g_strdup ("\033");
}
else if (event->key.keyval == GDK_Return ||
event->key.keyval == GDK_KP_Enter)
else if (event->key.keyval == GDK_KEY_Return ||
event->key.keyval == GDK_KEY_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_VoidSymbol)
if (event->keyval != GDK_KEY_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_Escape)
else if (event->keyval == GDK_KEY_Escape)
{
event->length = 1;
event->string = g_strdup ("\033");
}
else if (event->keyval == GDK_Return ||
event->keyval == GDK_KP_Enter)
else if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_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_VoidSymbol;
event->key.keyval = GDK_KEY_VoidSymbol;
gdk_keymap_translate_keyboard_state (keymap,
event->key.hardware_keycode,
+1 -6
View File
@@ -1968,12 +1968,7 @@ _gdk_windowing_set_default_display (GdkDisplay *display)
const gchar *startup_id;
if (!display)
{
gdk_display = NULL;
return;
}
gdk_display = GDK_DISPLAY_XDISPLAY (display);
return;
g_free (display_x11->startup_notification_id);
display_x11->startup_notification_id = NULL;
-1
View File
@@ -32,6 +32,5 @@
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
Display *gdk_display = NULL;
GdkAtom _gdk_selection_property;
gboolean _gdk_synchronize = FALSE;
+26 -24
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_Caps_Lock;
keymap->lock_keysym = GDK_KEY_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_Tab)
set_symbol (syms, keymap_x11, i, 1, GDK_ISO_Left_Tab);
if (get_symbol (syms, keymap_x11, i, 0) == GDK_KEY_Tab)
set_symbol (syms, keymap_x11, i, 1, GDK_KEY_ISO_Left_Tab);
}
/*
@@ -423,7 +423,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
keymap_x11->mod_keymap = XGetModifierMapping (xdisplay);
keymap_x11->lock_keysym = GDK_VoidSymbol;
keymap_x11->lock_keysym = GDK_KEY_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_Meta_L ||
syms[j] == GDK_Meta_R)
if (syms[j] == GDK_KEY_Meta_L ||
syms[j] == GDK_KEY_Meta_R)
mask |= GDK_META_MASK;
else if (syms[j] == GDK_Hyper_L ||
syms[j] == GDK_Hyper_R)
else if (syms[j] == GDK_KEY_Hyper_L ||
syms[j] == GDK_KEY_Hyper_R)
mask |= GDK_HYPER_MASK;
else if (syms[j] == GDK_Super_L ||
syms[j] == GDK_Super_R)
else if (syms[j] == GDK_KEY_Super_L ||
syms[j] == GDK_KEY_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_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;
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;
}
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_Mode_switch)
if (syms[j] == GDK_KEY_Mode_switch)
{
/* This modifier swaps groups */
keymap_x11->group_switch_mask |= mask;
}
else if (syms[j] == GDK_Num_Lock)
else if (syms[j] == GDK_KEY_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_Shift_Lock)
if (keymap_x11->lock_keysym == GDK_KEY_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_Caps_Lock && (state & GDK_LOCK_MASK) != 0)
if (keymap_x11->lock_keysym == GDK_KEY_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_Page_Up:
case GDK_KEY_Page_Up:
return "Page_Up";
case GDK_Page_Down:
case GDK_KEY_Page_Down:
return "Page_Down";
case GDK_KP_Page_Up:
case GDK_KEY_KP_Page_Up:
return "KP_Page_Up";
case GDK_KP_Page_Down:
case GDK_KEY_KP_Page_Down:
return "KP_Page_Down";
}
@@ -1822,7 +1822,9 @@ gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_KEYMAP_X11 (keymap);
get_xkb (keymap_x11);
if (KEYMAP_USE_XKB (keymap))
get_xkb (keymap_x11);
retval = TRUE;
+2 -63
View File
@@ -593,17 +593,13 @@ 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
@@ -723,7 +719,6 @@ _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)
{
@@ -809,7 +804,6 @@ _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)
@@ -1426,7 +1420,6 @@ 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;
@@ -1659,7 +1652,6 @@ 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)
@@ -2770,58 +2762,6 @@ 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
@@ -5566,7 +5506,6 @@ 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,10 +34,6 @@
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);
@@ -67,10 +63,6 @@ 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"
+2 -3
View File
@@ -230,7 +230,6 @@ gtk_public_h_sources = \
gtkimmulticontext.h \
gtkinfobar.h \
gtkinvisible.h \
gtkitem.h \
gtklabel.h \
gtklayout.h \
gtklinkbutton.h \
@@ -372,6 +371,7 @@ gtk_private_h_sources = \
gtkiconcache.h \
gtkintl.h \
gtkkeyhash.h \
gtkmenuprivate.h \
gtkmnemonichash.h \
gtkmountoperationprivate.h \
gtkpango.h \
@@ -496,7 +496,6 @@ gtk_base_c_sources = \
gtkimmulticontext.c \
gtkinfobar.c \
gtkinvisible.c \
gtkitem.c \
gtkkeyhash.c \
gtklabel.c \
gtklayout.c \
@@ -907,7 +906,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 = --strip-prefix=Gtk --add-include-path=$(top_builddir)/gdk
Gtk_3_0_gir_SCANNERFLAGS = --warn-all --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,7 +113,6 @@
#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>
+46 -209
View File
@@ -111,22 +111,12 @@ gtk_accel_map_foreach
gtk_accel_map_foreach_unfiltered
gtk_accel_map_get
gtk_accel_map_get_type G_GNUC_CONST
#ifndef _WIN64
gtk_accel_map_load PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_accel_map_load_utf8
#endif
gtk_accel_map_load
gtk_accel_map_load_fd
gtk_accel_map_load_scanner
gtk_accel_map_lock_path
gtk_accel_map_lookup_entry
#ifndef _WIN64
gtk_accel_map_save PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_accel_map_save_utf8
#endif
gtk_accel_map_save
gtk_accel_map_save_fd
gtk_accel_map_unlock_path
#endif
@@ -310,7 +300,6 @@ 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
@@ -370,7 +359,6 @@ 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
@@ -389,8 +377,6 @@ 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
@@ -400,7 +386,6 @@ 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
@@ -556,6 +541,7 @@ 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
@@ -922,7 +908,6 @@ 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
@@ -934,7 +919,6 @@ 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
@@ -1009,8 +993,6 @@ 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
@@ -1243,47 +1225,22 @@ gtk_expander_set_use_underline
#if IN_HEADER(__GTK_FILE_CHOOSER_H__)
#if IN_FILE(__GTK_FILE_CHOOSER_C__)
gtk_file_chooser_add_filter
#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
gtk_file_chooser_add_shortcut_folder_uri
gtk_file_chooser_error_quark
gtk_file_chooser_get_action
#ifndef _WIN64
gtk_file_chooser_get_current_folder PRIVATE
#endif
gtk_file_chooser_get_current_folder
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
#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_filename
gtk_file_chooser_get_filenames
gtk_file_chooser_get_files
gtk_file_chooser_get_filter
gtk_file_chooser_get_local_only
gtk_file_chooser_get_preview_file
#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_filename
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_widget_active
@@ -1298,48 +1255,23 @@ gtk_file_chooser_get_uri
gtk_file_chooser_get_uris
gtk_file_chooser_get_use_preview_label
gtk_file_chooser_list_filters
#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_folders
gtk_file_chooser_list_shortcut_folder_uris
gtk_file_chooser_remove_filter
#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
gtk_file_chooser_remove_shortcut_folder_uri
gtk_file_chooser_select_all
gtk_file_chooser_select_file
#ifndef _WIN64
gtk_file_chooser_select_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_select_filename_utf8
#endif
gtk_file_chooser_select_filename
gtk_file_chooser_select_uri
gtk_file_chooser_set_action
#ifndef _WIN64
gtk_file_chooser_set_current_folder PRIVATE
#endif
gtk_file_chooser_set_current_folder
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
#ifndef _WIN64
gtk_file_chooser_set_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_set_filename_utf8
#endif
gtk_file_chooser_set_filename
gtk_file_chooser_set_filter
gtk_file_chooser_set_local_only
gtk_file_chooser_set_preview_widget
@@ -1350,12 +1282,7 @@ gtk_file_chooser_set_uri
gtk_file_chooser_set_use_preview_label
gtk_file_chooser_unselect_all
gtk_file_chooser_unselect_file
#ifndef _WIN64
gtk_file_chooser_unselect_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_file_chooser_unselect_filename_utf8
#endif
gtk_file_chooser_unselect_filename
gtk_file_chooser_unselect_uri
#endif
#endif
@@ -1581,12 +1508,7 @@ gtk_icon_source_copy
gtk_icon_source_free
gtk_icon_source_get_direction
gtk_icon_source_get_direction_wildcarded
#ifndef _WIN64
gtk_icon_source_get_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_source_get_filename_utf8
#endif
gtk_icon_source_get_filename
gtk_icon_source_get_icon_name
gtk_icon_source_get_pixbuf
gtk_icon_source_get_size
@@ -1597,12 +1519,7 @@ gtk_icon_source_get_type G_GNUC_CONST
gtk_icon_source_new
gtk_icon_source_set_direction
gtk_icon_source_set_direction_wildcarded
#ifndef _WIN64
gtk_icon_source_set_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_source_set_filename_utf8
#endif
gtk_icon_source_set_filename
gtk_icon_source_set_icon_name
gtk_icon_source_set_pixbuf
gtk_icon_source_set_size
@@ -1622,35 +1539,20 @@ gtk_icon_info_get_base_size
gtk_icon_info_get_builtin_pixbuf
gtk_icon_info_get_display_name
gtk_icon_info_get_embedded_rect
#ifndef _WIN64
gtk_icon_info_get_filename PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_info_get_filename_utf8
#endif
gtk_icon_info_get_filename
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
#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_append_search_path
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
#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_search_path
gtk_icon_theme_get_type G_GNUC_CONST
gtk_icon_theme_has_icon
gtk_icon_theme_list_contexts
@@ -1660,21 +1562,11 @@ gtk_icon_theme_lookup_icon
gtk_icon_theme_lookup_by_gicon
gtk_icon_theme_choose_icon
gtk_icon_theme_new
#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_prepend_search_path
gtk_icon_theme_rescan_if_needed
gtk_icon_theme_set_custom_theme
gtk_icon_theme_set_screen
#ifndef _WIN64
gtk_icon_theme_set_search_path PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_icon_theme_set_search_path_utf8
#endif
gtk_icon_theme_set_search_path
#endif
#endif
@@ -1688,7 +1580,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_orientation
gtk_icon_view_get_item_orientation
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_item_at_pos
gtk_icon_view_convert_widget_to_bin_window_coords
@@ -1716,7 +1608,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_orientation
gtk_icon_view_set_item_orientation
gtk_icon_view_set_pixbuf_column
gtk_icon_view_set_row_spacing
gtk_icon_view_set_selection_mode
@@ -1759,12 +1651,7 @@ gtk_image_get_storage_type
gtk_image_get_type G_GNUC_CONST
gtk_image_new
gtk_image_new_from_animation
#ifndef _WIN64
gtk_image_new_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_image_new_from_file_utf8
#endif
gtk_image_new_from_file
gtk_image_new_from_icon_name
gtk_image_new_from_icon_set
gtk_image_new_from_pixbuf
@@ -1772,12 +1659,7 @@ gtk_image_new_from_pixmap
gtk_image_new_from_stock
gtk_image_new_from_gicon
gtk_image_set_from_animation
#ifndef _WIN64
gtk_image_set_from_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_image_set_from_file_utf8
#endif
gtk_image_set_from_file
gtk_image_set_from_icon_name
gtk_image_set_from_icon_set
gtk_image_set_from_pixbuf
@@ -1850,15 +1732,6 @@ 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
@@ -1967,6 +1840,8 @@ 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
@@ -1978,6 +1853,11 @@ 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
@@ -2680,7 +2560,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_orientation
gtk_progress_bar_get_inverted
gtk_progress_bar_get_pulse_step
gtk_progress_bar_get_text
gtk_progress_bar_get_ellipsize
@@ -2688,7 +2568,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_orientation
gtk_progress_bar_set_inverted
gtk_progress_bar_set_pulse_step
gtk_progress_bar_set_text
gtk_progress_bar_set_ellipsize
@@ -2713,6 +2593,7 @@ 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
@@ -2785,12 +2666,7 @@ gtk_range_set_value
#if IN_HEADER(__GTK_RC_H__)
#if IN_FILE(__GTK_RC_C__)
#ifndef _WIN64
gtk_rc_add_default_file PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_add_default_file_utf8
#endif
gtk_rc_add_default_file
gtk_rc_find_module_in_path
gtk_rc_find_pixmap_in_path
gtk_rc_get_default_files
@@ -2800,12 +2676,7 @@ gtk_rc_get_module_dir
gtk_rc_get_style
gtk_rc_get_style_by_paths
gtk_rc_get_theme_dir
#ifndef _WIN64
gtk_rc_parse PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_parse_utf8
#endif
gtk_rc_parse
gtk_rc_parse_color
gtk_rc_parse_color_full
gtk_rc_parse_priority
@@ -2815,12 +2686,7 @@ gtk_rc_reparse_all
gtk_rc_reparse_all_for_settings
gtk_rc_reset_styles
gtk_rc_scanner_new
#ifndef _WIN64
gtk_rc_set_default_files PRIVATE
#endif
#ifdef G_OS_WIN32
gtk_rc_set_default_files_utf8
#endif
gtk_rc_set_default_files
gtk_rc_style_copy
gtk_rc_style_get_type G_GNUC_CONST
gtk_rc_style_new
@@ -3399,6 +3265,7 @@ 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
@@ -4220,12 +4087,7 @@ 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
#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_file
gtk_ui_manager_add_ui_from_string
gtk_ui_manager_ensure_update
gtk_ui_manager_get_accel_group
@@ -4578,12 +4440,7 @@ gtk_window_set_decorated
gtk_window_set_deletable
gtk_window_set_default
gtk_window_set_default_icon
#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_from_file
gtk_window_set_default_icon_list
gtk_window_set_default_icon_name
gtk_window_set_default_size
@@ -4596,12 +4453,7 @@ gtk_window_set_geometry_hints
gtk_window_set_gravity
gtk_window_set_has_frame
gtk_window_set_icon
#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_from_file
gtk_window_set_icon_list
gtk_window_set_icon_name
gtk_window_set_keep_above
@@ -4632,6 +4484,7 @@ 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
@@ -4639,8 +4492,9 @@ 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
gtk_wrap_box_insert_child_with_padding
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
@@ -4648,6 +4502,7 @@ 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
@@ -4677,21 +4532,3 @@ 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
+3 -6
View File
@@ -631,7 +631,6 @@ 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);
@@ -1879,9 +1878,9 @@ text_view_key_press_event (GtkWidget *text_view,
switch (event->keyval)
{
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_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));
@@ -2219,7 +2218,6 @@ 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);
@@ -2302,7 +2300,6 @@ 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_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,
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,
0
};
static const guint invalid_unmodified_vals[] = {
GDK_Up, GDK_Down, GDK_Left, GDK_Right,
GDK_KP_Up, GDK_KP_Down, GDK_KP_Left, GDK_KP_Right,
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,
0
};
const guint *ac_val;
-28
View File
@@ -1003,31 +1003,3 @@ 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,12 +50,6 @@ 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);
+64 -15
View File
@@ -47,6 +47,7 @@
#include "config.h"
#include <math.h>
#include "gtkarrow.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -76,8 +77,17 @@ 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 (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
G_DEFINE_TYPE_WITH_CODE (GtkArrow, gtk_arrow, GTK_TYPE_MISC,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SIZE_REQUEST,
gtk_arrow_size_request_init))
static void
@@ -176,7 +186,6 @@ static void
gtk_arrow_init (GtkArrow *arrow)
{
GtkArrowPrivate *priv;
gint xpad, ypad;
arrow->priv = G_TYPE_INSTANCE_GET_PRIVATE (arrow,
GTK_TYPE_ARROW,
@@ -185,14 +194,50 @@ 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.
@@ -273,8 +318,10 @@ 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;
@@ -285,11 +332,12 @@ 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 = widget->allocation.width - xpad * 2;
height = widget->allocation.height - ypad * 2;
width = allocation.width - xpad * 2;
height = allocation.height - ypad * 2;
extent = MIN (width, height) * arrow_scaling;
effective_arrow_type = priv->arrow_type;
@@ -302,14 +350,14 @@ gtk_arrow_expose (GtkWidget *widget,
effective_arrow_type = GTK_ARROW_LEFT;
}
x = floor (widget->allocation.x + xpad
+ ((widget->allocation.width - extent) * xalign));
y = floor (widget->allocation.y + ypad
+ ((widget->allocation.height - extent) * yalign));
x = floor (allocation.x + xpad + ((allocation.width - extent) * xalign));
y = floor (allocation.y + ypad + ((allocation.height - extent) * yalign));
shadow_type = priv->shadow_type;
if (widget->state == GTK_STATE_ACTIVE)
state = gtk_widget_get_state (widget);
if (state == GTK_STATE_ACTIVE)
{
if (shadow_type == GTK_SHADOW_IN)
shadow_type = GTK_SHADOW_OUT;
@@ -321,8 +369,9 @@ gtk_arrow_expose (GtkWidget *widget,
shadow_type = GTK_SHADOW_ETCHED_IN;
}
gtk_paint_arrow (widget->style, widget->window,
widget->state, shadow_type,
gtk_paint_arrow (gtk_widget_get_style (widget),
gtk_widget_get_window (widget),
state, shadow_type,
&event->area, widget, "arrow",
effective_arrow_type, TRUE,
x, y, extent, extent);
+8 -16
View File
@@ -30,26 +30,18 @@
* @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.
*
* 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.
* The primary purpose of this class is to keep track of the various
* properties of #GtkHButtonBox and #GtkVButtonBox widgets.
*
* 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. Therefore it ignores the homogeneous property which it inherited
* from GtkBox, and always behaves as if homogeneous was %TRUE.
* 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.
*/
#include "config.h"
@@ -172,7 +164,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
PROP_LAYOUT_STYLE,
g_param_spec_enum ("layout-style",
P_("Layout style"),
P_("How to layout the buttons in the box. Possible values are spread, edge, start and end"),
P_("How to lay out the buttons in the box. Possible values are: spread, edge, start and end"),
GTK_TYPE_BUTTON_BOX_STYLE,
DEFAULT_LAYOUT_STYLE,
GTK_PARAM_READWRITE));
@@ -323,7 +315,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 layout buttons in @widget.
* Returns: the method used to lay out buttons in @widget.
*/
GtkButtonBoxStyle
gtk_button_box_get_layout (GtkButtonBox *widget)
+8 -3
View File
@@ -214,10 +214,15 @@ get_child_padding_delta (GtkBin *bin,
gint *delta_v)
{
GtkBinPrivate *priv = bin->priv;
gint hmin, vmin, child_hmin, child_vmin;
gint hmin, vmin, hnat, vnat, child_hmin, child_vmin;
gtk_size_request_get_width (GTK_SIZE_REQUEST (bin), &hmin, NULL);
gtk_size_request_get_height (GTK_SIZE_REQUEST (bin), &vmin, NULL);
/* 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 (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_Tab)
keyval = GDK_ISO_Left_Tab;
if (keyval == GDK_KEY_Tab)
keyval = GDK_KEY_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_debug_flags & GTK_DEBUG_BUILDER)
if (gtk_get_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: nul-terminated array of objects to build
* @object_ids: (array zero-teminated=1) (element-type utf8): 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: the function used to connect the signals
* @func: (scope call): 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_debug_flags & GTK_DEBUG_BUILDER)
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER)
{
GString *tags = g_string_new ("");
int i;
+19 -29
View File
@@ -227,6 +227,7 @@ 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;
@@ -1284,19 +1285,16 @@ 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 + border_width;
attributes.y = allocation.y + border_width;
attributes.width = allocation.width - border_width * 2;
attributes.height = allocation.height - border_width * 2;
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
@@ -1455,7 +1453,6 @@ 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;
@@ -1476,30 +1473,28 @@ gtk_button_size_allocate (GtkWidget *widget,
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (button->event_window,
allocation->x + border_width,
allocation->y + border_width,
allocation->width - border_width * 2,
allocation->height - border_width * 2);
allocation->x,
allocation->y,
allocation->width,
allocation->height);
child = gtk_bin_get_child (GTK_BIN (button));
if (child && gtk_widget_get_visible (child))
{
child_allocation.x = allocation->x + border_width + inner_border.left + xthickness;
child_allocation.y = allocation->y + border_width + inner_border.top + ythickness;
child_allocation.x = allocation->x + inner_border.left + xthickness;
child_allocation.y = allocation->y + inner_border.top + ythickness;
child_allocation.width =
allocation->width -
xthickness * 2 -
inner_border.left -
inner_border.right -
border_width * 2;
inner_border.right;
child_allocation.height =
allocation->height -
ythickness * 2 -
inner_border.top -
inner_border.bottom -
border_width * 2;
inner_border.bottom;
if (gtk_widget_get_can_default (GTK_WIDGET (button)))
{
@@ -1548,7 +1543,6 @@ _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;
@@ -1563,8 +1557,6 @@ _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,
@@ -1575,10 +1567,10 @@ _gtk_button_paint (GtkButton *button,
style = gtk_widget_get_style (widget);
window = gtk_widget_get_window (widget);
x = allocation.x + border_width;
y = allocation.y + border_width;
width = allocation.width - border_width * 2;
height = allocation.height - border_width * 2;
x = allocation.x;
y = allocation.y;
width = allocation.width;
height = allocation.height;
if (gtk_widget_has_default (widget) &&
GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL)
@@ -1925,7 +1917,6 @@ 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),
@@ -1933,12 +1924,11 @@ 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 = ((border_width + style->xthickness) * 2 +
minimum = (style->xthickness * 2 +
inner_border.left + inner_border.right);
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
@@ -1946,7 +1936,7 @@ gtk_button_get_size (GtkSizeRequest *widget,
}
else
{
minimum = ((border_width + style->ythickness) * 2 +
minimum = (style->ythickness * 2 +
inner_border.top + inner_border.bottom);
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
+39 -16
View File
@@ -3367,8 +3367,8 @@ gtk_calendar_key_press (GtkWidget *widget,
switch (event->keyval)
{
case GDK_KP_Left:
case GDK_Left:
case GDK_KEY_KP_Left:
case GDK_KEY_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_KP_Right:
case GDK_Right:
case GDK_KEY_KP_Right:
case GDK_KEY_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_KP_Up:
case GDK_Up:
case GDK_KEY_KP_Up:
case GDK_KEY_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_KP_Down:
case GDK_Down:
case GDK_KEY_KP_Down:
case GDK_KEY_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_KP_Space:
case GDK_space:
case GDK_KEY_KP_Space:
case GDK_KEY_space:
row = priv->focus_row;
col = priv->focus_col;
@@ -3875,20 +3875,16 @@ 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");
@@ -4033,6 +4029,33 @@ 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,8 +59,6 @@ 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().
*
@@ -72,7 +70,6 @@ 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;
@@ -160,6 +157,9 @@ 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_ISO_Left_Tab)
accel_key = GDK_Tab;
if (accel_key == GDK_KEY_ISO_Left_Tab)
accel_key = GDK_KEY_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_Escape:
case GDK_KEY_Escape:
goto out; /* cancel */
case GDK_BackSpace:
case GDK_KEY_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 "gtkprogressbar.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -42,8 +42,9 @@ enum
PROP_PULSE,
PROP_TEXT_XALIGN,
PROP_TEXT_YALIGN,
PROP_ORIENTATION
};
PROP_ORIENTATION,
PROP_INVERTED
};
struct _GtkCellRendererProgressPrivate
{
@@ -56,7 +57,8 @@ struct _GtkCellRendererProgressPrivate
gint offset;
gfloat text_xalign;
gfloat text_yalign;
GtkProgressBarOrientation orientation;
GtkOrientation orientation;
gboolean inverted;
};
static void gtk_cell_renderer_progress_finalize (GObject *object);
@@ -95,7 +97,8 @@ static void gtk_cell_renderer_progress_render (GtkCellRenderer *ce
guint flags);
G_DEFINE_TYPE (GtkCellRendererProgress, gtk_cell_renderer_progress, GTK_TYPE_CELL_RENDERER)
G_DEFINE_TYPE_WITH_CODE (GtkCellRendererProgress, gtk_cell_renderer_progress, GTK_TYPE_CELL_RENDERER,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
static void
gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
@@ -112,9 +115,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
**/
@@ -202,24 +205,17 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE));
/**
* 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_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_object_class_override_property (object_class,
PROP_ORIENTATION,
"orientation");
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));
g_type_class_add_private (object_class,
sizeof (GtkCellRendererProgressPrivate));
@@ -246,7 +242,8 @@ gtk_cell_renderer_progress_init (GtkCellRendererProgress *cellprogress)
priv->text_xalign = 0.5;
priv->text_yalign = 0.5;
priv->orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
priv->orientation = GTK_ORIENTATION_HORIZONTAL,
priv->inverted = FALSE;
}
@@ -306,6 +303,9 @@ 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,6 +343,9 @@ 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);
}
@@ -562,8 +565,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
NULL, widget, NULL,
x, y, w, h);
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
clip.y = y;
clip.height = h;
@@ -573,7 +575,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
bar_size = get_bar_size (priv->pulse, priv->value, full_size);
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
if (!priv->inverted)
bar_position = get_bar_position (start, full_size, bar_size,
priv->pulse, priv->offset, is_rtl);
else
@@ -593,7 +595,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
bar_size = get_bar_size (priv->pulse, priv->value, full_size);
if (priv->orientation == GTK_PROGRESS_BOTTOM_TO_TOP)
if (priv->inverted)
bar_position = get_bar_position (start, full_size, bar_size,
priv->pulse, priv->offset, TRUE);
else
@@ -637,8 +639,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
if (bar_position > start)
{
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
clip.x = x;
clip.width = bar_position - x;
@@ -658,8 +659,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
if (bar_position + bar_size < start + full_size)
{
if (priv->orientation == GTK_PROGRESS_LEFT_TO_RIGHT
|| priv->orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
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_Up)
if (event->keyval == GDK_KEY_Up)
{
gtk_spin_button_spin (GTK_SPIN_BUTTON (widget), GTK_SPIN_STEP_FORWARD, 1);
return TRUE;
}
else if (event->keyval == GDK_Down)
else if (event->keyval == GDK_KEY_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 _ColorSelectionPrivate
struct _GtkColorSelectionPrivate
{
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,
ColorSelectionPrivate *priv);
GtkColorSelectionPrivate *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 (ColorSelectionPrivate));
g_type_class_add_private (gobject_class, sizeof (GtkColorSelectionPrivate));
}
static void
@@ -338,13 +338,13 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
GtkAdjustment *adjust;
GtkWidget *picker_image;
gint i, j;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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, ColorSelectionPrivate);
priv = colorsel->private_data = G_TYPE_INSTANCE_GET_PRIVATE (colorsel, GTK_TYPE_COLOR_SELECTION, GtkColorSelectionPrivate);
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);
ColorSelectionPrivate *priv = cselection->private_data;
GtkColorSelectionPrivate *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);
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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);
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
gint i;
priv = colorsel->private_data;
@@ -711,7 +711,7 @@ color_sample_drag_begin (GtkWidget *widget,
gpointer data)
{
GtkColorSelection *colorsel = data;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
gdouble *colsrc;
priv = colorsel->private_data;
@@ -743,7 +743,7 @@ color_sample_drop_handle (GtkWidget *widget,
gpointer data)
{
GtkColorSelection *colorsel = data;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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 }
};
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
priv = colorsel->private_data;
@@ -987,7 +987,7 @@ update_tooltips (GtkColorSelection *colorsel)
static void
color_sample_new (GtkColorSelection *colorsel)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
priv = colorsel->private_data;
@@ -1224,7 +1224,7 @@ palette_change_color (GtkWidget *drawing_area,
gdouble *color)
{
gint x, y;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
GdkColor gdk_color;
GdkColor *current_colors;
GdkScreen *screen;
@@ -1376,7 +1376,7 @@ save_color_selected (GtkWidget *menuitem,
{
GtkColorSelection *colorsel;
GtkWidget *drawing_area;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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_space) ||
(event->keyval == GDK_Return) ||
(event->keyval == GDK_ISO_Enter) ||
(event->keyval == GDK_KP_Enter) ||
(event->keyval == GDK_KP_Space))
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 (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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
GdkColor color;
GdkWindow *root_window = gdk_screen_get_root_window (screen);
@@ -1735,7 +1735,7 @@ static void
shutdown_eyedropper (GtkWidget *widget)
{
GtkColorSelection *colorsel;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
colorsel = GTK_COLOR_SELECTION (widget);
priv = colorsel->private_data;
@@ -1811,15 +1811,15 @@ key_press (GtkWidget *invisible,
switch (event->keyval)
{
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
case GDK_KEY_space:
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
grab_color_at_pointer (screen, pointer_device, x, y, data);
/* fall through */
case GDK_Escape:
case GDK_KEY_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_Up:
case GDK_KP_Up:
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
dy = state == GDK_MOD1_MASK ? -BIG_STEP : -1;
break;
case GDK_Down:
case GDK_KP_Down:
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
dy = state == GDK_MOD1_MASK ? BIG_STEP : 1;
break;
case GDK_Left:
case GDK_KP_Left:
case GDK_KEY_Left:
case GDK_KEY_KP_Left:
dx = state == GDK_MOD1_MASK ? -BIG_STEP : -1;
break;
case GDK_Right:
case GDK_KP_Right:
case GDK_KEY_Right:
case GDK_KEY_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");
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
GdkColor color;
gchar *text;
@@ -2029,7 +2029,7 @@ hsv_changed (GtkWidget *hsv,
gpointer data)
{
GtkColorSelection *colorsel;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
colorsel = GTK_COLOR_SELECTION (data);
priv = colorsel->private_data;
@@ -2055,7 +2055,7 @@ adjustment_changed (GtkAdjustment *adjustment,
gpointer data)
{
GtkColorSelection *colorsel;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *priv;
GtkAdjustment *adj;
gchar *text;
@@ -2176,7 +2176,7 @@ make_palette_frame (GtkColorSelection *colorsel,
gint j)
{
GtkWidget *frame;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv = colorsel->private_data;
GtkColorSelectionPrivate *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;
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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)
{
ColorSelectionPrivate *priv;
GtkColorSelectionPrivate *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,
ColorSelectionPrivate *priv)
GtkColorSelectionPrivate *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 _ColorSelectionPrivate ColorSelectionPrivate;
typedef struct _GtkColorSelectionPrivate GtkColorSelectionPrivate;
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
typedef void (* GtkColorSelectionChangePaletteFunc) (const GdkColor *colors,
@@ -60,7 +60,7 @@ struct _GtkColorSelection
GtkVBox parent_instance;
/* < private_data > */
ColorSelectionPrivate *private_data;
GtkColorSelectionPrivate *private_data;
};
struct _GtkColorSelectionClass
-3
View File
@@ -151,7 +151,6 @@ 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);
@@ -188,8 +187,6 @@ 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_Down, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, GDK_MOD1_MASK,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Down, GDK_MOD1_MASK,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, GDK_MOD1_MASK,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, GDK_MOD1_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Up, GDK_MOD1_MASK,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"popdown", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Up, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Home, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_START);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Home, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_START);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Down, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_End, 0,
"move-active", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_END);
gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_Return || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter ||
event->keyval == GDK_space || event->keyval == GDK_KP_Space)
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)
{
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_Escape)
if (event->keyval == GDK_KEY_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_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter)
else if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_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_width (widget, &min_width, NULL);
gtk_size_request_get_height_for_width (widget, min_width, minimum_size, natural_size);
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);
}
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_width (widget, minimum_size, natural_size);
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_size, natural_size);
}
+123 -12
View File
@@ -107,6 +107,13 @@ 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);
@@ -233,7 +240,10 @@ 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;
@@ -1078,6 +1088,12 @@ 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.
*/
@@ -1252,13 +1268,7 @@ gtk_container_remove (GtkContainer *container,
{
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (GTK_IS_WIDGET (widget));
/* 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_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container));
g_signal_emit (container, container_signals[REMOVE], 0, widget);
}
@@ -1408,7 +1418,6 @@ _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);
@@ -1521,6 +1530,103 @@ 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
@@ -1587,6 +1693,9 @@ 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,
@@ -1603,10 +1712,12 @@ gtk_container_set_focus_child (GtkContainer *container,
* gtk_container_get_focus_child:
* @container: a #GtkContainer
*
* Returns the current focus child widget inside @container.
* 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 child widget which has the focus
* inside @container, or %NULL if none is set.
* Returns: The child widget which will recieve the focus inside @container when
* the @conatiner is focussed, or %NULL if none is set.
*
* Since: 2.14
**/
+4
View File
@@ -62,6 +62,8 @@ struct _GtkContainerClass
{
GtkWidgetClass parent_class;
unsigned int handle_border_width : 1;
void (*add) (GtkContainer *container,
GtkWidget *widget);
void (*remove) (GtkContainer *container,
@@ -194,6 +196,8 @@ 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,7 +976,6 @@ 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);
+3 -12
View File
@@ -54,7 +54,7 @@ typedef enum {
#ifdef G_ENABLE_DEBUG
#define GTK_NOTE(type,action) G_STMT_START { \
if (gtk_debug_flags & GTK_DEBUG_##type) \
if (gtk_get_debug_flags () & GTK_DEBUG_##type) \
{ action; }; } G_STMT_END
#else /* !G_ENABLE_DEBUG */
@@ -63,17 +63,8 @@ typedef enum {
#endif /* G_ENABLE_DEBUG */
#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;
guint gtk_get_debug_flags (void);
void gtk_set_debug_flags (guint flags);
G_END_DECLS
+7 -161
View File
@@ -31,7 +31,6 @@
#include "gtkdialog.h"
#include "gtkhbbox.h"
#include "gtklabel.h"
#include "gtkhseparator.h"
#include "gtkmarshalers.h"
#include "gtkvbox.h"
#include "gdkkeysyms.h"
@@ -46,10 +45,6 @@ struct _GtkDialogPrivate
{
GtkWidget *vbox;
GtkWidget *action_area;
GtkWidget *separator;
guint ignore_separator : 1;
};
typedef struct _ResponseData ResponseData;
@@ -66,15 +61,6 @@ 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);
@@ -124,32 +110,16 @@ 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));
g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate));
/**
* GtkDialog::response:
@@ -236,7 +206,7 @@ gtk_dialog_class_init (GtkDialogClass *class)
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0);
}
static void
@@ -278,8 +248,6 @@ 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.
@@ -303,10 +271,6 @@ 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);
@@ -340,49 +304,6 @@ 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,
@@ -534,13 +455,10 @@ 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);
}
@@ -715,7 +633,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: the button widget that was added
* Return value: (transfer full): the button widget that was added
**/
GtkWidget*
gtk_dialog_add_button (GtkDialog *dialog,
@@ -872,69 +790,6 @@ 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
@@ -1136,15 +991,6 @@ 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
@@ -1153,7 +999,7 @@ _gtk_dialog_set_ignore_separator (GtkDialog *dialog,
* Gets the widget button that uses the given response ID in the action area
* of a dialog.
*
* Returns: the @widget button that uses the given @response_id, or %NULL.
* Returns: (transfer none):the @widget button that uses the given @response_id, or %NULL.
*
* Since: 2.20
*/
+1 -10
View File
@@ -41,8 +41,7 @@ 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_NO_SEPARATOR = 1 << 2 /* no separator bar above buttons */
GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1 /* call gtk_window_set_destroy_with_parent () */
} GtkDialogFlags;
/* Convenience enum to use for response_id's. Positive values are
@@ -150,10 +149,6 @@ 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,
@@ -172,10 +167,6 @@ 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_Escape:
case GDK_KEY_Escape:
gtk_drag_cancel (info, GTK_DRAG_RESULT_USER_CANCELLED, event->time);
return TRUE;
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
case GDK_KEY_space:
case GDK_KEY_Return:
case GDK_KEY_ISO_Enter:
case GDK_KEY_KP_Enter:
case GDK_KEY_KP_Space:
gtk_drag_end (info, event->time);
gtk_drag_drop (info, event->time);
return TRUE;
case GDK_Up:
case GDK_KP_Up:
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
dy = (state & GDK_MOD1_MASK) ? -BIG_STEP : -SMALL_STEP;
break;
case GDK_Down:
case GDK_KP_Down:
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
dy = (state & GDK_MOD1_MASK) ? BIG_STEP : SMALL_STEP;
break;
case GDK_Left:
case GDK_KP_Left:
case GDK_KEY_Left:
case GDK_KEY_KP_Left:
dx = (state & GDK_MOD1_MASK) ? -BIG_STEP : -SMALL_STEP;
break;
case GDK_Right:
case GDK_KP_Right:
case GDK_KEY_Right:
case GDK_KEY_KP_Right:
dx = (state & GDK_MOD1_MASK) ? BIG_STEP : SMALL_STEP;
break;
}
+78 -125
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_Right, 0,
add_move_binding (binding_set, GDK_KEY_Right, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_Left, 0,
add_move_binding (binding_set, GDK_KEY_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_KP_Right, 0,
add_move_binding (binding_set, GDK_KEY_KP_Right, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_KP_Left, 0,
add_move_binding (binding_set, GDK_KEY_KP_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_Left, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_KP_Right, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_KP_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_KP_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_Home, 0,
add_move_binding (binding_set, GDK_KEY_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
add_move_binding (binding_set, GDK_End, 0,
add_move_binding (binding_set, GDK_KEY_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
add_move_binding (binding_set, GDK_KP_Home, 0,
add_move_binding (binding_set, GDK_KEY_KP_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
add_move_binding (binding_set, GDK_KP_End, 0,
add_move_binding (binding_set, GDK_KEY_KP_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
add_move_binding (binding_set, GDK_Home, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
add_move_binding (binding_set, GDK_End, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
add_move_binding (binding_set, GDK_KP_Home, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_KP_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
add_move_binding (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
add_move_binding (binding_set, GDK_KEY_KP_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
/* Select all
*/
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_a, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_slash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_slash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_backslash, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_a, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_Return, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_ISO_Enter, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Enter, 0,
"activate", 0);
/* Deleting text */
gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, 0,
"delete-from-cursor", 2,
G_TYPE_ENUM, GTK_DELETE_CHARS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_BackSpace, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0,
"backspace", 0);
/* Make this do the same as Backspace, to help with mis-typing */
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_SHIFT_MASK,
"backspace", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_KP_Delete, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_BackSpace, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_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_x, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_x, GDK_CONTROL_MASK,
"cut-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_c, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_c, GDK_CONTROL_MASK,
"copy-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_v, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_v, GDK_CONTROL_MASK,
"paste-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK,
"cut-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK,
"copy-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_SHIFT_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK,
"paste-clipboard", 0);
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, 0,
"toggle-overwrite", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Insert, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Insert, 0,
"toggle-overwrite", 0);
/**
@@ -1743,21 +1743,6 @@ 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"),
@@ -3298,7 +3283,6 @@ 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);
@@ -3327,12 +3311,8 @@ gtk_entry_draw_frame (GtkWidget *widget,
}
style = gtk_widget_get_style (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;
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
gtk_paint_shadow (style, window,
state, priv->shadow_type,
@@ -3478,19 +3458,13 @@ 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);
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);
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
if (gtk_widget_get_window (widget) == event->window)
{
@@ -3535,7 +3509,7 @@ gtk_entry_expose (GtkWidget *widget,
gdk_drawable_get_size (icon_info->window, &width, &height);
gtk_paint_flat_box (style, icon_info->window,
gtk_widget_get_state (widget), GTK_SHADOW_NONE,
state, GTK_SHADOW_NONE,
NULL, widget, "entry_bg",
0, 0, width, height);
@@ -4130,10 +4104,10 @@ gtk_entry_key_press (GtkWidget *widget,
}
}
if (event->keyval == GDK_Return ||
event->keyval == GDK_KP_Enter ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_Escape)
if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_Escape)
{
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
@@ -4377,8 +4351,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) - entry->text;
end_index = g_utf8_offset_to_pointer (text, end_pos) - entry->text;
start_index = g_utf8_offset_to_pointer (text, start_pos) - text;
end_index = g_utf8_offset_to_pointer (text, end_pos) - text;
return g_strndup (text + start_index, end_index - start_index);
}
@@ -4539,7 +4513,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
GdkEventKey *key_event,
gpointer data)
{
if (key_event->keyval == GDK_Escape)
if (key_event->keyval == GDK_KEY_Escape)
{
entry->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
@@ -4549,7 +4523,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
}
/* override focus */
if (key_event->keyval == GDK_Up || key_event->keyval == GDK_Down)
if (key_event->keyval == GDK_KEY_Up || key_event->keyval == GDK_KEY_Down)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
@@ -4720,9 +4694,6 @@ 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");
@@ -4733,9 +4704,6 @@ 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");
}
@@ -4744,9 +4712,6 @@ 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");
}
@@ -6762,24 +6727,12 @@ 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);
/* 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);
}
buffer_connect_signals (entry);
obj = G_OBJECT (entry);
g_object_freeze_notify (obj);
@@ -9262,16 +9215,16 @@ gtk_entry_completion_timeout (gpointer data)
static inline gboolean
keyval_is_cursor_move (guint keyval)
{
if (keyval == GDK_Up || keyval == GDK_KP_Up)
if (keyval == GDK_KEY_Up || keyval == GDK_KEY_KP_Up)
return TRUE;
if (keyval == GDK_Down || keyval == GDK_KP_Down)
if (keyval == GDK_KEY_Down || keyval == GDK_KEY_KP_Down)
return TRUE;
if (keyval == GDK_Page_Up)
if (keyval == GDK_KEY_Page_Up)
return TRUE;
if (keyval == GDK_Page_Down)
if (keyval == GDK_KEY_Page_Down)
return TRUE;
return FALSE;
@@ -9297,21 +9250,21 @@ gtk_entry_completion_key_press (GtkWidget *widget,
{
GtkTreePath *path = NULL;
if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)
if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_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_Down || event->keyval == GDK_KP_Down)
else if (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_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_Page_Up)
else if (event->keyval == GDK_KEY_Page_Up)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = matches + actions - 1;
@@ -9330,7 +9283,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
completion->priv->current_selected = matches - 1;
}
}
else if (event->keyval == GDK_Page_Down)
else if (event->keyval == GDK_KEY_Page_Down)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = 0;
@@ -9417,11 +9370,11 @@ gtk_entry_completion_key_press (GtkWidget *widget,
return TRUE;
}
else if (event->keyval == GDK_Escape ||
event->keyval == GDK_Left ||
event->keyval == GDK_KP_Left ||
event->keyval == GDK_Right ||
event->keyval == GDK_KP_Right)
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)
{
gboolean retval = TRUE;
@@ -9436,7 +9389,7 @@ gtk_entry_completion_key_press (GtkWidget *widget,
else if (completion->priv->inline_selection)
{
/* Escape rejects the tentative completion */
if (event->keyval == GDK_Escape)
if (event->keyval == GDK_KEY_Escape)
{
if (completion->priv->completion_prefix)
gtk_entry_set_text (GTK_ENTRY (completion->priv->entry),
@@ -9447,9 +9400,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_Right ||
event->keyval == GDK_KP_Right ||
event->keyval == GDK_Escape)
if (event->keyval == GDK_KEY_Right ||
event->keyval == GDK_KEY_KP_Right ||
event->keyval == GDK_KEY_Escape)
gtk_editable_set_position (GTK_EDITABLE (widget), -1);
else
gtk_editable_set_position (GTK_EDITABLE (widget), 0);
@@ -9464,11 +9417,11 @@ keypress_completion_out:
return retval;
}
else if (event->keyval == GDK_Tab ||
event->keyval == GDK_KP_Tab ||
event->keyval == GDK_ISO_Left_Tab)
else if (event->keyval == GDK_KEY_Tab ||
event->keyval == GDK_KEY_KP_Tab ||
event->keyval == GDK_KEY_ISO_Left_Tab)
{
GtkDirectionType dir = event->keyval == GDK_ISO_Left_Tab ?
GtkDirectionType dir = event->keyval == GDK_KEY_ISO_Left_Tab ?
GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
_gtk_entry_reset_im_context (GTK_ENTRY (widget));
@@ -9481,9 +9434,9 @@ keypress_completion_out:
return TRUE;
}
else if (event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter ||
event->keyval == GDK_Return)
else if (event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_Return)
{
GtkTreeIter iter;
GtkTreeModel *model = NULL;
-5
View File
@@ -67,17 +67,12 @@ 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);
+51 -50
View File
@@ -35,27 +35,35 @@
G_BEGIN_DECLS
/* Anchor types */
/**
* 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.
*/
typedef enum
{
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;
GTK_ALIGN_FILL,
GTK_ALIGN_START,
GTK_ALIGN_END,
GTK_ALIGN_CENTER
} GtkAlign;
/* Arrow placement */
typedef enum
@@ -347,8 +355,7 @@ typedef enum
GTK_SELECTION_NONE, /* Nothing can be selected */
GTK_SELECTION_SINGLE,
GTK_SELECTION_BROWSE,
GTK_SELECTION_MULTIPLE,
GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
GTK_SELECTION_MULTIPLE
} GtkSelectionMode;
/* Shadow types */
@@ -371,22 +378,6 @@ 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
{
@@ -404,14 +395,6 @@ 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
{
@@ -576,15 +559,15 @@ typedef enum {
/**
* GtkWrapBoxSpreading:
* @GTK_WRAP_BOX_SPREAD_BEGIN: Items are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_START: Children 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: Items are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_END: Children 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: Items are allocated no more than their natural size
* @GTK_WRAP_BOX_SPREAD_EVEN: Children are allocated no more than their natural size
* in the layout's orientation and any extra space is evenly distributed
* between children.
* as empty space 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.
*
@@ -599,12 +582,30 @@ typedef enum {
*
*/
typedef enum {
GTK_WRAP_BOX_SPREAD_BEGIN = 0,
GTK_WRAP_BOX_SPREAD_START = 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
+1 -2
View File
@@ -1495,8 +1495,7 @@ gtk_expander_get_width_for_height (GtkSizeRequest *widget,
gint *minimum_width,
gint *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);
GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_width, natural_width);
}
-169
View File
@@ -2567,172 +2567,3 @@ 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,21 +145,6 @@ 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_1, GDK_2, GDK_3, GDK_4, GDK_5, GDK_6, GDK_7, GDK_8, GDK_9, GDK_0
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
};
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_l, GDK_CONTROL_MASK,
GDK_KEY_l, GDK_CONTROL_MASK,
"location-toggle-popup",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_slash, 0,
GDK_KEY_slash, 0,
"location-popup",
1, G_TYPE_STRING, "/");
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Divide, 0,
GDK_KEY_KP_Divide, 0,
"location-popup",
1, G_TYPE_STRING, "/");
#ifdef G_OS_UNIX
gtk_binding_entry_add_signal (binding_set,
GDK_asciitilde, 0,
GDK_KEY_asciitilde, 0,
"location-popup",
1, G_TYPE_STRING, "~");
#endif
gtk_binding_entry_add_signal (binding_set,
GDK_v, GDK_CONTROL_MASK,
GDK_KEY_v, GDK_CONTROL_MASK,
"location-popup-on-paste",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_Up, GDK_MOD1_MASK,
GDK_KEY_Up, GDK_MOD1_MASK,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_BackSpace, 0,
GDK_KEY_BackSpace, 0,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Up, GDK_MOD1_MASK,
GDK_KEY_KP_Up, GDK_MOD1_MASK,
"up-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_Down, GDK_MOD1_MASK,
GDK_KEY_Down, GDK_MOD1_MASK,
"down-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Down, GDK_MOD1_MASK,
GDK_KEY_KP_Down, GDK_MOD1_MASK,
"down-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_Home, GDK_MOD1_MASK,
GDK_KEY_Home, GDK_MOD1_MASK,
"home-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Home, GDK_MOD1_MASK,
GDK_KEY_KP_Home, GDK_MOD1_MASK,
"home-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_d, GDK_MOD1_MASK,
GDK_KEY_d, GDK_MOD1_MASK,
"desktop-folder",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_h, GDK_CONTROL_MASK,
GDK_KEY_h, GDK_CONTROL_MASK,
"show-hidden",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_s, GDK_MOD1_MASK,
GDK_KEY_s, GDK_MOD1_MASK,
"search-shortcut",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_r, GDK_MOD1_MASK,
GDK_KEY_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_Tab
|| event->keyval == GDK_KP_Tab
|| event->keyval == GDK_ISO_Left_Tab
if (event->keyval == GDK_KEY_Tab
|| event->keyval == GDK_KEY_KP_Tab
|| event->keyval == GDK_KEY_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_Right
|| event->keyval == GDK_KP_Right
|| event->keyval == GDK_Left
|| event->keyval == GDK_KP_Left)
return ((event->keyval == GDK_KEY_Right
|| event->keyval == GDK_KEY_KP_Right
|| event->keyval == GDK_KEY_Left
|| event->keyval == GDK_KEY_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_slash
|| event->keyval == GDK_KP_Divide
if ((event->keyval == GDK_KEY_slash
|| event->keyval == GDK_KEY_KP_Divide
#ifdef G_OS_UNIX
|| event->keyval == GDK_asciitilde
|| event->keyval == GDK_KEY_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_Return
|| event->keyval == GDK_ISO_Enter
|| event->keyval == GDK_KP_Enter
|| event->keyval == GDK_space
|| event->keyval == GDK_KP_Space)
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)
&& ((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_BackSpace
|| event->keyval == GDK_Delete
|| event->keyval == GDK_KP_Delete)
if ((event->keyval == GDK_KEY_BackSpace
|| event->keyval == GDK_KEY_Delete
|| event->keyval == GDK_KEY_KP_Delete)
&& (event->state & modifiers) == 0)
{
remove_selected_bookmarks (impl);
return TRUE;
}
if ((event->keyval == GDK_F2)
if ((event->keyval == GDK_KEY_F2)
&& (event->state & modifiers) == 0)
{
rename_selected_bookmark (impl);
-1
View File
@@ -92,7 +92,6 @@ 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_Tab && !control_pressed)
if (event->keyval == GDK_KEY_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 (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 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 (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 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