Commit Graph

156 Commits

Author SHA1 Message Date
Jeremy Whiting
f9d903995d Added api to set a window to fullscreen on a given monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=752677
2015-07-25 07:08:59 -06:00
Matthias Clasen
d642ae78fc GtkWindow: Small documentation addition 2015-06-20 10:36:09 -04:00
Matthias Clasen
c5c21bb1cf GtkWindow: Add a getter for the custom titlebar
This is needed for the glade integration of CSD windows.
2014-10-18 12:51:30 -04:00
Matthias Clasen
3b62f2f01d GtkWindow: improve the inspector keybinding
Binding signals can return a boolean indicating whether they
handled the event. Use that here and return FALSE if the
inspector keybinding is disabled.
2014-09-26 09:50:33 -04:00
Matthias Clasen
a19bc50f64 GtkWindow: Elaborate the keybindings
Keep Ctrol-Shift-D as a straight toggle-the-inspector keybinding,
but make Ctrl-Shift-I always bring up the inspector, and point
it at the widget under the pointer.
2014-07-06 22:37:57 -04:00
Jasper St. Pierre
ece9ae4bc5 gtkwindow: Remove resize grips
Resize grips were introduced for GNOME 3.0, before we had any of the
"new GNOME app" features like invisible borders and CSD. With OS X 10.6
and 10.7, Apple has replaced the classic grips in their applications
with invisible borders as well.

New GNOME app designs don't use resize grips anymore and the new
default theme for GTK+, Adwaita, disables them entirely by forcing their
width and height to 0.

They're past their time. Remove the code to support them. This can
always be reverted if some app relies on them.
2014-07-03 12:58:41 -04:00
Matthias Clasen
872fbfacd3 Split GtkWindowGroup into its own file
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Matthias Clasen
d5251141ce docs: enum cleanup
Move GtkWindowPosition and GtkWindowType to the only place
they are used.
2014-05-20 09:54:01 -04:00
Matthias Clasen
b8531087bd inspector: All to turn it on programmatically
Export gtk_window_set_interactive_debugging.
https://bugzilla.gnome.org/show_bug.cgi?id=730008
2014-05-13 15:20:36 -04:00
Matthias Clasen
19bf88acfa Add a 'toggle-debugging' keybinding
This is bound to Ctrl-Shift-I (for inspector) by default.
It loads the gtkparasite module and opens a parasite window.
2014-05-10 22:04:19 -04:00
William Jon McCann
f49e077c27 docs: add keys_changed signal to GtkWindowClass 2014-01-21 13:33:45 -05:00
William Jon McCann
add1ca00f4 docs: add Gtk*Class docs
https://bugzilla.gnome.org/show_bug.cgi?id=81006
2014-01-20 12:31:21 -05:00
Cosimo Cecchi
197785744b window: add an is-maximized property to GtkWindow
With proper notifications, plus an accessor method for that state. This
allows client to just listen to notify::is-maximized instead of tracking
window-state-event.

https://bugzilla.gnome.org/show_bug.cgi?id=698786
2014-01-13 23:13:37 -05:00
Matthias Clasen
c73b48f28a Add a gtk_window_close function
This is useful when adding close buttons in custom titlebars.
2013-06-28 22:19:15 -04:00
Matthias Clasen
20c8c8b91c Add annotations to gtk headers
Add annotations to all exported functions in GTK+ headers.
2013-05-05 15:38:47 -04:00
Benjamin Otte
01f7ed1d07 window: Deprecate gtk_window_reshow_with_initial_size() 2013-05-01 16:41:12 +02:00
Matthias Clasen
30d0542309 Add documentation for gtk_window_set_titlebar 2013-03-18 08:50:22 -04:00
Matthias Clasen
4afbaf699f Add gtk_window_set_titlebar
A new function that sets a custom titlebar on a GtkWindow.
With client-side decorations, the custom titlebar simply
replaces the one that GtkWindow would otherwise create itself.
With traditional decorations, we tell the window manager
to just decorate the window with a border. This works ok
at least with metacity and mutter.
2013-03-18 08:50:22 -04:00
Alexander Larsson
fa8b71450c Add gtk_widget_get/set_opacity
This adds gtk_widget_get/set_opacity, as well as a GtkWidget.opacity
property. Additionally it deprectates gtk_window_get/set_opacity and
removes the GtkWindow.opacity property (in preference for the new
identical inherited property from GtkWidget, which should be ABI/API
compat).

The implementation is using the new gdk_window_set_opacity child
window support for windowed widgets, and cairo_push/pop_group()
bracketing in gtk_widget_draw() for non-window widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
2c25bd85b8 gtk: Use versioned deprecations
This patch changes all uses of GDK_DEPRECATED(_FOR) in gtk headers
by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same
time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions
in 3.2 and 3.4.
2012-02-27 07:11:43 -05:00
Andrea Cimitan
4a18fe7ef2 Introduce gtk_window_get/set_attached_to()
gtk_window_get/set_attached_to() is a new API that allows for windows to
be attached to a GtkWidget.
The attachment is a logical binding between the toplevel window and the
widget that generated it; this kind of information is currently used to
propagate style information from the widget to the window, but is also
useful e.g. for accessibility.

https://bugzilla.gnome.org/show_bug.cgi?id=666103
2012-01-12 14:03:00 -05:00
Matthias Clasen
69a529572d Revert "GtkWindow: new API to store state in GSettings"
This reverts commit 730765de91.

This needs more thought, committing it on the same day as filing
the bug was premature.
2012-01-09 00:53:53 -05:00
Ryan Lortie
730765de91 GtkWindow: new API to store state in GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=667438
2012-01-06 16:18:48 -05:00
Florian Müllner
4f8f8fe828 window: Add hide-titlebar-when-maximized property
For maximized windows, titlebars cannot be used to reposition or
scale the window, so if an application does not use it to convey
useful information (other than the application name), the screen
space occupied by titlebars could be put to better use.
Add a new window property which requests from the window manager
to hide titlebars when windows are maximized to account for this.

https://bugzilla.gnome.org/show_bug.cgi?id=665616
2011-12-15 16:31:56 +01:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Matthias Clasen
efd0e6ec1f Add a setter for GtkWindow.has_user_ref_count
This is needed for some language bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=638880
2011-01-10 11:49:06 -05:00
Stef Walter
433a22cd11 Remove private header from gtkwindow.h
https://bugzilla.gnome.org/show_bug.cgi?id=637907
2010-12-23 19:23:48 -06:00
Matthias Clasen
3e08a23237 Drop long-obsolete linux framebuffer APIs
The functions to set frames on windows stopped being interesting
when the linux framebuffer port was dropped, many years ago.

Similar functionality may come back with client-side decorations
in the future.
2010-12-23 12:59:49 -05:00
Matthias Clasen
7b665316cf Hide GtkWindowGroup members
In the process of removing all sealed members from headers.
At the same time, add a gtkwindowprivate.h header and move
all internal functions from gtkwindow.h there.
2010-12-17 20:41:16 -05:00
Michael Natterer
c2f29f2cef gtk: clean up GtkWidget signals
- add slots for damage-event, move-focus and keynav-failed
- reorder signals a bit so related stuff is grouped together
- some indentation fixes in the GtkWidgetClass
- remove the move-focus compat hack from GtkTextView
- turn the move-focus compat hack in GtkWindow into properly
  implementing GtkWidget::move-focus()
2010-10-20 17:02:38 +02:00
Ryan Lortie
ab5fb5dee5 GtkApplication rewrite 2010-10-19 01:31:09 +02:00
Owen W. Taylor
a4a7a611f2 GtkWindow: Allow setting size from geometry
If you set a geometry widget via gtk_window_set_geometry_hints() it
becomes very hard to compute appropriate toplevel sizes in pixels
to make the window a particular size. Synthesizing strings and passing
them to gtk_window_parse_geometry() is possible, but to avoid
avoid such ugliness, add functions:

 gtk_window_set_default_geometry()
 gtk_window_resize_to_geometry()

That act like gtk_window_set_default_size() and
gtk_window_resize() but are in terms of the resize increments of the
geometry widget.

https://bugzilla.gnome.org/show_bug.cgi?id=631796
2010-10-11 14:06:16 -04:00
Matthias Clasen
f6347baf64 Add resize grips to GtkWindow
Allow any window to display a resize grip, in the south-east or
south-west corner, depending on text direction. This is implemented
as a shaped window that gets overlayed on top of whatever content
is there. We add api that allows widgets to avoid the resize grip,
if desired.

The ::has-resize-grip property controls if a window may display
a resize grip. It will only be displayed if the window is resizable
and not maximized.

The size and visual appearance of the resize grip is under theme
control, using the resize-grip-width/height style properties and
the paint_resize_grip style function.
2010-10-08 02:14:10 -04:00
Benjamin Otte
948768c708 API: remove gtk_window_set_visual()
gtk_widget_set_visual() exists now and can be used instead.

This reverts commit 59b227e123.
2010-09-28 19:13:24 +02:00
Benjamin Otte
59b227e123 window: Keep track of own visual
Add gtk_window_set_visual() and a "visual" property. This allows
changing the window visual to the rgba one and other awesome things
(like implementing the trayicon spec).
2010-09-26 15:11:32 +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
Javier Jardón
304b1a1f56 Added _gtk_widget_get_wmclass() internal function
Needed by GtkPlug
2010-08-31 02:51:36 +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
Javier Jardón
1a03a65e36 Remove GtkWindow:allow-grow and GtkWindow::allow_shrink deprecated properties 2010-07-02 21:45:08 +02:00
Matthias Clasen
9bf7f99a17 Make gtk_window_group_get_current_grab public
See bug #620832.
2010-06-24 11:16:09 -04:00
Carlos Garcia Campos
6bac9dfd28 GtkWindow: Add gtk_window_has_group()
To check whether the window has an explicit group

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618271#c2
2010-05-26 16:49:31 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
f39f644fb2 Move GtkAccelGroup private structure to shared header file
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=602174
2010-05-03 01:51:20 +02:00
Michael Natterer
5e29973773 Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
...and disallow inclusion of individual files unconditionally.
2010-05-03 01:51:18 +02:00
Javier Jardón
2b71ef33fb Remove deprecated GtkWindow function 2010-05-03 01:41:37 +02:00
Matthias Clasen
c59f76fda2 Only show the mnemonic underline when pressing Alt
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
2009-12-20 03:11:05 -05:00
Christian Dywan
00d87c2563 [gtk/gtkwindow] Added accessor for GTK_WINDOW ()->type
There already is the "type" property, but an accessor
function for it would be intuitive: gtk_window_get_window_type()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=595498
2009-11-11 20:07:39 +01:00