Commit Graph

88 Commits

Author SHA1 Message Date
Benjamin Otte
55de4e7140 snapshot: Convert GtkFixed 2016-11-15 17:48:45 +01:00
Benjamin Otte
079f0427cb fixed: Port to GskRenderNode
The fishbowl demo uses this.
2016-11-05 03:35:46 +01:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Benjamin Otte
a2a23ee337 fixed: Use gdk_window_new_child() 2016-10-18 00:22:35 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Cosimo Cecchi
380ebbf76d fixed: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, gtk_style_context_set_background() should really be called every
time the style is updated. Fix that.
2015-07-01 16:09:23 -07:00
Benjamin Otte
e2a83cae0f fixed: Fix drawing order
Restore the drawing order in GtkFixed to what it was in 3.8. With the
GDK drawing changes this will not be correct in some cases (un-windowed
children can now overlap windowed children and native children overlap
everything), but fixes Eclipse drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=725089
2014-02-28 03:08:11 +01:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
Matthias Clasen
ffea6a5624 Revert "fixed: draw css background and borders"
This reverts commit ba6128f8af.

This change breaks emacs drawing entirely. Since GtkFixed is
somewhat of a legacy widget anyway, lets just not bother doing
this modernization there, at least for now.
2014-02-03 16:02:16 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
Paolo Borelli
ba6128f8af fixed: draw css background and borders
https://bugzilla.gnome.org/show_bug.cgi?id=711324
2013-11-03 14:13:16 +01:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Alexander Larsson
3d4cd4db3e Add gtk_widget_(un)register_window
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
54c97f3ba2 Fix another GtkFixed regression, in gtk_fixed_forall()
b3f6f67c changed the loop from while() to for() in gtk_fixed_forall(),
but that's wrong since the callback can have side-effects on the list,
in case the current child gets removed. And that's the case when the
widget is destroyed.

Patch by Vincent Untz
https://bugzilla.gnome.org/show_bug.cgi?id=641196
2011-02-02 00:40:02 -05:00
Vincent Untz
62d7593fc2 Fix crash in gtk_fixed_remove()
b3f6f67c changed the loop from while() to for(), but the line to move to
the next child was kept, so we could go past the end of the list.

https://bugzilla.gnome.org/show_bug.cgi?id=641176
2011-02-01 20:08:52 +01:00
Pavel Holejsovsky
2bd38dc7f5 Move GtkFixed docs inline
Also remove incorrect documentation of opaque GtkFixed class struct.
2011-01-17 15:27:02 +01:00
Carlos Garnacho
b062a583d3 Make GtkFixed use GtkStyleContext 2011-01-04 03:06:21 +01:00
Matthias Clasen
eb60282b1b Fix gtk_fixed_get_preferred_width
When dealing with widths, use x, not y.
Spotted by Ignacio Casal Quintero.
2010-10-30 17:35:21 +09:00
Matthias Clasen
b3f6f67c33 Remove size_request from GtkFixed 2010-10-30 17:35:17 +09:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
e8a6bad00b gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
9e81022bf6 Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
fe2815026b gtk/gtkfixed.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
0991115ada gtkfixed: Move public members to private structure 2010-07-13 19:40:47 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
ffd80c80c9 Remove gtk_fixed_get_has_window() and gtk_fixed_set_has_window() 2010-05-03 01:51:21 +02:00
Javier Jardón
1934de4b65 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:51:33 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Christian Dywan
5d675b9f11 No GTK_WIDGET_NO_WINDOW in GtkFixed and deprecate gtk_fixed_set_has_window 2010-01-04 08:39:24 +01:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Xan Lopez
6dc678ede3 fix typo in documentation.
2008-03-06  Xan Lopez  <xan@gnome.org>

	* gtk/gtkfixed.c: fix typo in documentation.

svn path=/trunk/; revision=19722
2008-03-06 19:14:17 +00:00
Michael Natterer
d95069aa1f gtk/gtkaction.c gtk/gtkassistant.c gtk/gtkbin.c gtk/gtkbox.c
2008-02-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaction.c
	* gtk/gtkassistant.c
	* gtk/gtkbin.c
	* gtk/gtkbox.c
	* gtk/gtkcalendar.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkcombo.c
	* gtk/gtkdrawingarea.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfixed.h
	* gtk/gtkgamma.c
	* gtk/gtkhpaned.c
	* gtk/gtkiconview.c
	* gtk/gtkitem.c
	* gtk/gtkitemfactory.c: remove g_return_if_fail() from private
	functions and virtual function implementations.


svn path=/trunk/; revision=19491
2008-02-07 15:50:39 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
20455969df Fix a typo, spotted by David Odin.
2005-08-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfixed.c (gtk_fixed_put): Fix a typo, spotted by
	David Odin.
2005-08-02 03:49:39 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
fc45590f13 Forgotten file. 2005-01-03 17:23:38 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00