1997-11-24 22:37:52 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1997-11-24 22:37:52 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +00:00
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifndef __GTK_WINDOW_H__
|
|
|
|
#define __GTK_WINDOW_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
#include <gtk/gtkaccelgroup.h>
|
1997-11-24 22:37:52 +00:00
|
|
|
#include <gtk/gtkbin.h>
|
|
|
|
#include <gtk/gtkenums.h>
|
|
|
|
#include <gtk/gtkwidget.h>
|
|
|
|
|
1998-05-06 01:43:56 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-05-06 01:43:56 +00:00
|
|
|
|
|
|
|
#define GTK_TYPE_WINDOW (gtk_window_get_type ())
|
2000-02-13 08:16:48 +00:00
|
|
|
#define GTK_WINDOW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
|
|
|
|
#define GTK_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_WINDOW, GtkWindowClass))
|
|
|
|
#define GTK_IS_WINDOW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_WINDOW))
|
|
|
|
#define GTK_IS_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WINDOW))
|
|
|
|
#define GTK_WINDOW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_WINDOW, GtkWindowClass))
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
|
2001-04-01 04:05:42 +00:00
|
|
|
typedef struct _GtkWindow GtkWindow;
|
|
|
|
typedef struct _GtkWindowClass GtkWindowClass;
|
|
|
|
typedef struct _GtkWindowGeometryInfo GtkWindowGeometryInfo;
|
2001-06-14 21:44:01 +00:00
|
|
|
typedef struct _GtkWindowGroup GtkWindowGroup;
|
|
|
|
typedef struct _GtkWindowGroupClass GtkWindowGroupClass;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
struct _GtkWindow
|
|
|
|
{
|
|
|
|
GtkBin bin;
|
|
|
|
|
|
|
|
gchar *title;
|
|
|
|
gchar *wmclass_name;
|
|
|
|
gchar *wmclass_class;
|
2001-03-07 21:10:44 +00:00
|
|
|
gchar *wm_role;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
GtkWidget *focus_widget;
|
|
|
|
GtkWidget *default_widget;
|
1998-12-07 06:37:27 +00:00
|
|
|
GtkWindow *transient_parent;
|
2001-04-01 04:05:42 +00:00
|
|
|
GtkWindowGeometryInfo *geometry_info;
|
|
|
|
GdkWindow *frame;
|
2001-06-14 21:44:01 +00:00
|
|
|
GtkWindowGroup *group;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
guint16 configure_request_count;
|
1997-11-24 22:37:52 +00:00
|
|
|
guint allow_shrink : 1;
|
|
|
|
guint allow_grow : 1;
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
guint configure_notify_received : 1;
|
|
|
|
/* The following flags are initially TRUE (before a window is mapped).
|
|
|
|
* They cause us to compute a configure request that involves
|
|
|
|
* default-only parameters. Once mapped, we set them to FALSE.
|
|
|
|
* Then we set them to TRUE again on unmap (for position)
|
|
|
|
* and on unrealize (for size).
|
1998-12-07 06:37:27 +00:00
|
|
|
*/
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
guint need_default_position : 1;
|
|
|
|
guint need_default_size : 1;
|
|
|
|
guint position : 3;
|
2002-02-23 00:13:17 +00:00
|
|
|
guint type : 4; /* GtkWindowType */
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
guint has_user_ref_count : 1;
|
|
|
|
guint has_focus : 1;
|
|
|
|
|
1998-08-11 19:06:18 +00:00
|
|
|
guint modal : 1;
|
2000-10-20 23:14:41 +00:00
|
|
|
guint destroy_with_parent : 1;
|
2001-01-08 17:04:17 +00:00
|
|
|
|
|
|
|
guint has_frame : 1;
|
|
|
|
|
2001-02-27 20:40:15 +00:00
|
|
|
/* gtk_window_iconify() called before realization */
|
|
|
|
guint iconify_initially : 1;
|
|
|
|
guint stick_initially : 1;
|
|
|
|
guint maximize_initially : 1;
|
2001-03-07 21:10:44 +00:00
|
|
|
guint decorated : 1;
|
|
|
|
|
2002-02-23 00:13:17 +00:00
|
|
|
guint type_hint : 3; /* GdkWindowTypeHint */
|
|
|
|
guint gravity : 5; /* GdkGravity */
|
2001-03-07 21:10:44 +00:00
|
|
|
|
2001-01-08 17:04:17 +00:00
|
|
|
guint frame_left;
|
|
|
|
guint frame_top;
|
|
|
|
guint frame_right;
|
|
|
|
guint frame_bottom;
|
added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org>
* added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org>
* gtk/maketypes.awk: fix type utils generation on unix.
* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
registry.
* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
introduced ::accel_changed signal for change notification, and
gtk_accel_group_connect/disconnect to connect closures to accel groups.
made gtk_accel_group_attach/detach and gtk_accel_group_activate private
functions.
deprecated gtk_accel_group_ref/unref.
* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
to accel group changed notification and basically operate on closures.
removed gtk_accel_label_get_accel_object and
gtk_accel_label_set_accel_object.
introduced gtk_accel_label_set_accel_closure, and for convenience,
gtk_accel_label_set_accel_widget.
* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
which mostly moved into gtkaccelmap.[hc].
removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
and gtk_item_factory_print_func.
* gtk/gtkmain.c: call _gtk_accel_map_init().
* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
that associates an accelerator path with menu items, through which
persistent accelerator settings on menu items are enabled.
* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
paths of menu item can be default constructed to allow installation
of accelerators on menu items that don't come with an accelerator
binding by default.
* gtk/gtksettings.c: fix STRING type rc settings by special casing
them appropriately in the parser.
* gtk/gtksignal.[hc]: allow a class function offset of 0 for
gtk_signal_newv().
* gtk/gtkwidget.[hc]: accelerator API revamp.
removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
gtk_widget_(un)lock_accelerators.
accelerators maintained through gtk_widget_add/remove_accelerator()
are not runtime changable now, the correct sequence to setup a
widget for runtime changable accelerators is now:
gtk_accel_map_add_entry(accel_path, key, mods);
_gtk_widget_set_accel_path(widget, accel_path, accel_group);
* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
group changes (as well as mnemonic changes) through the new signal
::accels_changed.
Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org>
* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
GString->string conversions.
2001-11-13 00:53:47 +00:00
|
|
|
|
2001-11-20 23:43:03 +00:00
|
|
|
guint keys_changed_handler;
|
2001-03-21 18:58:28 +00:00
|
|
|
|
|
|
|
GdkModifierType mnemonic_modifier;
|
Make gdkx.h the only installed header from gdk/x11. All structures in
Fri Sep 7 11:51:44 2001 Owen Taylor <otaylor@redhat.com>
Make gdkx.h the only installed header from gdk/x11.
All structures in gdk/x11 are opaque.
* gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h:
Don't install gdk{drawable,pixmap,window}-x11.h.
* gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c:
Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11,
GdkVisualClass into C files.
* gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static.
* gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c,
gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c}
Add public functions to replace previously exported direct
structure access.
gdk_x11_colormap_get_{xdisplay,xcolormap}
gdk_x11_cursor_get_{xdisplay,xcursor},
gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual,
gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage},
gdk_x11_gc_get_{xdisplay,ximage}
* gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo,
GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals.
Fix a number of variables and functions that were exported
"accidentally" from GDK.
* gdk/**.[ch]: gdk => _gdk for gdk_visual_init,
gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit,
gdk_input_exit, gdk_windowing_exit, gdk_event_func, gdk_event_data,
gdk_event_notify, gdk_queued_events, gdk_queued_tail,
gdk_event_new, gdk_events_queue, gdk_events_unqueue,
gdk_event_queue_find_first, gdk_event_queue_remove_link,
gdk_event_queue_append, gdk_event_button_generate,
gdk_debug_flags, gdk_default_filters, gdk_parent_root.
* gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c,
gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}:
gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks,
gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window,
gdk_use_xshm, gdk_input_ignore_core.
* gdk/x11/xsettings-common.h (xsettings_list_insert): Add
#defines to namespace functions into the private _gdk_
namespace.
* gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window ()
to replace gdk_parent_root exported variable. Adjust and
deprecate GDK_ROOT_PARENT().
* demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix
GDK_ROOT_PARENT usage, remove includes of port-specific
headers.
* gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for
_gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core,
gdk_input_devices, _gdk_input_windows, gdk_init_input_core.
* gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c}
docs/Changes-2.0.txt: Remove gdk_wm_protocols,
gdk_wm_delete_window functions, gdk_wm_take_focus,
use gdk_atom_intern() instead.
* gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h}
gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h}
gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h}
gtk/gtkselection.c
Unexport gdk_selection_property, just use
gdk_atom_intern ("GDK_SELECTION").
* gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}:
Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type,
GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate,
GdkVisualprivate, gdk_x11_gc_flush.
Make a number of public exports of variables into functions
to increase encapsulation.
* gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h
gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer,
move to gdkinternals.h. Add gdk_device_get_core_pointer ().
* gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h
docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code,
gdk_error_warnings.
* gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h}
docs/Changes-2.0.txt:
s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen()
s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow()
Add gdk_x11_get_default_xdisplay().
* gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c
win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c
gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class,
Don't export gdk_progclass, move --class command line
option and handling to common portion of GDK.
Miscellaneous fixes:
* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix
g_return_val_if_fail that should have been g_return_if_fail.
* gdk/gdkinternals.h gdk/gdkprivate.h: Move
gdk_synthesize_window_state() to the semi-public gdkprivate.h.
* gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded
X11 dependency.
* gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO:
Remove unused gdk_key_repeat_disable/restore.
* linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c
x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def:
Remove unused gdk_null_window_warnings variable.
* gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox;
it can be retrieved from the repository; it is too far
from functional to be worth having people check out;
it would be easier to start from scratch, I suspect.
* gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID().
* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
Fix some accidentally global variables and unused global variables.
* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
Fix some accidentally global variables and unused global variables.
Add some space for future expansion to multihead.
* gdk/gdkdrawable.h: Add four reserved function pointers
for future expansion of GdkDrawableClass.
* gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer
where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
|
|
|
gpointer gtk_reserved1; /* For future GdkScreen * */
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkWindowClass
|
|
|
|
{
|
|
|
|
GtkBinClass parent_class;
|
|
|
|
|
2001-01-08 17:04:17 +00:00
|
|
|
void (* set_focus) (GtkWindow *window,
|
|
|
|
GtkWidget *focus);
|
2001-11-03 23:02:40 +00:00
|
|
|
gboolean (* frame_event) (GtkWindow *window,
|
2001-01-08 17:04:17 +00:00
|
|
|
GdkEvent *event);
|
2001-04-18 22:21:45 +00:00
|
|
|
|
|
|
|
/* G_SIGNAL_ACTION signals for keybindings */
|
|
|
|
|
|
|
|
void (* activate_focus) (GtkWindow *window);
|
|
|
|
void (* activate_default) (GtkWindow *window);
|
|
|
|
void (* move_focus) (GtkWindow *window,
|
2002-02-21 17:14:10 +00:00
|
|
|
GtkDirectionType direction);
|
|
|
|
|
2001-11-20 23:43:03 +00:00
|
|
|
void (*keys_changed) (GtkWindow *window);
|
2002-02-23 20:22:05 +00:00
|
|
|
|
|
|
|
/* Padding for future expansion */
|
|
|
|
void (*_gtk_reserved1) (void);
|
|
|
|
void (*_gtk_reserved2) (void);
|
|
|
|
void (*_gtk_reserved3) (void);
|
|
|
|
void (*_gtk_reserved4) (void);
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
2001-06-14 21:44:01 +00:00
|
|
|
#define GTK_TYPE_WINDOW_GROUP (gtk_window_group_get_type ())
|
|
|
|
#define GTK_WINDOW_GROUP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_WINDOW_GROUP, GtkWindowGroup))
|
|
|
|
#define GTK_WINDOW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WINDOW_GROUP, GtkWindowGroupClass))
|
|
|
|
#define GTK_IS_WINDOW_GROUP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_WINDOW_GROUP))
|
|
|
|
#define GTK_IS_WINDOW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WINDOW_GROUP))
|
2001-06-15 18:58:58 +00:00
|
|
|
#define GTK_WINDOW_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WINDOW_GROUP, GtkWindowGroupClass))
|
2001-06-14 21:44:01 +00:00
|
|
|
|
|
|
|
struct _GtkWindowGroup
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
GSList *grabs;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkWindowGroupClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2002-02-23 20:22:05 +00:00
|
|
|
|
|
|
|
/* Padding for future expansion */
|
|
|
|
void (*_gtk_reserved1) (void);
|
|
|
|
void (*_gtk_reserved2) (void);
|
|
|
|
void (*_gtk_reserved3) (void);
|
|
|
|
void (*_gtk_reserved4) (void);
|
2001-06-14 21:44:01 +00:00
|
|
|
};
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2000-08-30 00:33:38 +00:00
|
|
|
GtkType gtk_window_get_type (void) G_GNUC_CONST;
|
1997-11-24 22:37:52 +00:00
|
|
|
GtkWidget* gtk_window_new (GtkWindowType type);
|
|
|
|
void gtk_window_set_title (GtkWindow *window,
|
|
|
|
const gchar *title);
|
2001-06-24 15:34:48 +00:00
|
|
|
G_CONST_RETURN gchar *gtk_window_get_title (GtkWindow *window);
|
1997-11-24 22:37:52 +00:00
|
|
|
void gtk_window_set_wmclass (GtkWindow *window,
|
1998-05-12 21:30:52 +00:00
|
|
|
const gchar *wmclass_name,
|
|
|
|
const gchar *wmclass_class);
|
2001-03-07 21:10:44 +00:00
|
|
|
void gtk_window_set_role (GtkWindow *window,
|
|
|
|
const gchar *role);
|
2001-06-24 15:34:48 +00:00
|
|
|
G_CONST_RETURN gchar *gtk_window_get_role (GtkWindow *window);
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
void gtk_window_add_accel_group (GtkWindow *window,
|
|
|
|
GtkAccelGroup *accel_group);
|
|
|
|
void gtk_window_remove_accel_group (GtkWindow *window,
|
|
|
|
GtkAccelGroup *accel_group);
|
1998-11-28 07:42:37 +00:00
|
|
|
void gtk_window_set_position (GtkWindow *window,
|
1997-11-24 22:37:52 +00:00
|
|
|
GtkWindowPosition position);
|
2001-03-16 20:12:40 +00:00
|
|
|
gboolean gtk_window_activate_focus (GtkWindow *window);
|
2001-11-17 01:18:49 +00:00
|
|
|
void gtk_window_set_focus (GtkWindow *window,
|
|
|
|
GtkWidget *focus);
|
2001-10-31 20:41:02 +00:00
|
|
|
GtkWidget *gtk_window_get_focus (GtkWindow *window);
|
2001-11-17 01:18:49 +00:00
|
|
|
void gtk_window_set_default (GtkWindow *window,
|
|
|
|
GtkWidget *default_widget);
|
2001-03-16 20:12:40 +00:00
|
|
|
gboolean gtk_window_activate_default (GtkWindow *window);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-12-07 06:37:27 +00:00
|
|
|
void gtk_window_set_transient_for (GtkWindow *window,
|
|
|
|
GtkWindow *parent);
|
2001-06-24 15:34:48 +00:00
|
|
|
GtkWindow *gtk_window_get_transient_for (GtkWindow *window);
|
2001-03-05 15:09:02 +00:00
|
|
|
void gtk_window_set_type_hint (GtkWindow *window,
|
|
|
|
GdkWindowTypeHint hint);
|
2001-06-24 15:34:48 +00:00
|
|
|
GdkWindowTypeHint gtk_window_get_type_hint (GtkWindow *window);
|
2000-10-20 23:14:41 +00:00
|
|
|
void gtk_window_set_destroy_with_parent (GtkWindow *window,
|
|
|
|
gboolean setting);
|
2001-06-24 15:34:48 +00:00
|
|
|
gboolean gtk_window_get_destroy_with_parent (GtkWindow *window);
|
2001-03-07 21:10:44 +00:00
|
|
|
|
2001-06-25 23:48:51 +00:00
|
|
|
void gtk_window_set_resizable (GtkWindow *window,
|
|
|
|
gboolean resizable);
|
|
|
|
gboolean gtk_window_get_resizable (GtkWindow *window);
|
2001-03-29 23:02:30 +00:00
|
|
|
|
|
|
|
void gtk_window_set_gravity (GtkWindow *window,
|
|
|
|
GdkGravity gravity);
|
|
|
|
GdkGravity gtk_window_get_gravity (GtkWindow *window);
|
|
|
|
|
|
|
|
|
|
|
|
void gtk_window_set_geometry_hints (GtkWindow *window,
|
|
|
|
GtkWidget *geometry_widget,
|
|
|
|
GdkGeometry *geometry,
|
|
|
|
GdkWindowHints geom_mask);
|
|
|
|
|
2001-01-08 17:04:17 +00:00
|
|
|
/* gtk_window_set_has_frame () must be called before realizing the window_*/
|
2001-06-15 15:58:26 +00:00
|
|
|
void gtk_window_set_has_frame (GtkWindow *window,
|
|
|
|
gboolean setting);
|
2001-06-24 15:34:48 +00:00
|
|
|
gboolean gtk_window_get_has_frame (GtkWindow *window);
|
2001-01-08 17:04:17 +00:00
|
|
|
void gtk_window_set_frame_dimensions (GtkWindow *window,
|
|
|
|
gint left,
|
|
|
|
gint top,
|
|
|
|
gint right,
|
|
|
|
gint bottom);
|
2001-06-24 15:34:48 +00:00
|
|
|
void gtk_window_get_frame_dimensions (GtkWindow *window,
|
|
|
|
gint *left,
|
|
|
|
gint *top,
|
|
|
|
gint *right,
|
|
|
|
gint *bottom);
|
|
|
|
void gtk_window_set_decorated (GtkWindow *window,
|
|
|
|
gboolean setting);
|
|
|
|
gboolean gtk_window_get_decorated (GtkWindow *window);
|
2001-03-09 16:43:19 +00:00
|
|
|
|
2001-08-29 02:20:02 +00:00
|
|
|
void gtk_window_set_icon_list (GtkWindow *window,
|
|
|
|
GList *list);
|
|
|
|
GList* gtk_window_get_icon_list (GtkWindow *window);
|
|
|
|
void gtk_window_set_icon (GtkWindow *window,
|
|
|
|
GdkPixbuf *icon);
|
|
|
|
GdkPixbuf* gtk_window_get_icon (GtkWindow *window);
|
|
|
|
void gtk_window_set_default_icon_list (GList *list);
|
|
|
|
GList* gtk_window_get_default_icon_list (void);
|
|
|
|
|
1998-08-11 19:06:18 +00:00
|
|
|
/* If window is set modal, input will be grabbed when show and released when hide */
|
2001-06-14 21:44:01 +00:00
|
|
|
void gtk_window_set_modal (GtkWindow *window,
|
|
|
|
gboolean modal);
|
2001-06-24 15:34:48 +00:00
|
|
|
gboolean gtk_window_get_modal (GtkWindow *window);
|
2001-06-14 21:44:01 +00:00
|
|
|
GList* gtk_window_list_toplevels (void);
|
documented necessary changes for 1.4 transition.
Fri May 12 17:13:32 2000 Tim Janik <timj@gtk.org>
* docs/Changes-1.4.txt: documented necessary changes for 1.4 transition.
* gtk/gtktext.c: made the adjustments no-construct args, simply
provide default adjustments.
(gtk_text_destroy): release adjustments.
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): made the
adjustment argument non-construct.
* gtk/gtkprogress.c (gtk_progress_destroy): release adjustment here,
instead of in finalize.
(gtk_progress_get_text_from_value):
(gtk_progress_get_current_text):
(gtk_progress_set_value):
(gtk_progress_get_percentage_from_value):
(gtk_progress_get_current_percentage):
(gtk_progress_set_percentage):
(gtk_progress_configure): ensure an adjustment is present.
Thu May 11 01:24:08 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorsel.[hc]:
* gtk/gtkcolorseldialog.[hc]:
* gtk/gtkhsv.[hc]: major code cleanups, destroy handlers need to chain
their parent implementation, use bit fields for boolean values, don't
create unused widgets, usage of glib types, braces go on their own
lines, function argument alignment, #include directives etc. etc. etc..
* gtk/Makefile.am (gtk_public_h_sources): install gtkhsv.h.
Wed May 10 23:29:52 2000 Tim Janik <timj@gtk.org>
* gtk/gtktoolbar.c (gtk_toolbar_destroy): don't unref a NULL tooltips.
* gtk/gtkfilesel.c (gtk_file_selection_destroy): don't free a cmpl_state
of NULL.
* gtk/gtkcombo.c (gtk_combo_item_destroy): don#t keep references
to freed data.
(gtk_combo_destroy): don't keep a pointer to a destroyed window.
* gtk/gtkmenu.c (gtk_menu_init): reset the menu's toplevel pointer
to NULL when the toplevel is getting destroyed.
(gtk_menu_set_tearoff_state): same here for the tearoff_window.
(gtk_menu_destroy):
(gtk_menu_init): store the information of whether we have to
readd the initial child ref_count during destruction in a new
GtkMenu field needs_destruction_ref_count.
* gtk/gtkviewport.c: SHAME! ok this one is tricky, so i note it
here, those reading: learn from my mistake! ;)
in order for set_?adjustment to support a default adjustemnt if
invoked with an adjustment pointer of NULL, the code read (pseudo):
if (v->adjustment) unref (v->adjustment);
if (!adjustment) adjustment = adjustment_new ();
if (v->adjustment != adjustment) v->adjustment = ref (adjustment);
now imagine the first unref to actually free the old adjustment and
adjustment_new() creating a new adjustment from the very same memory
portion. here, the latter comparision will unintendedly fail, and
all hell breaks loose.
(gtk_viewport_set_hadjustment):
(gtk_viewport_set_vadjustment): reset viewport->?adjustment to NULL
after unreferencing it.
* gtk/gtkcontainer.[hc]: removed toplevel registration
functions: gtk_container_register_toplevel(),
gtk_container_unregister_toplevel() and
gtk_container_get_toplevels() which had wrong semantics
anyways: it didn't reference and copy the list.
* gtk/gtkwindow.c: we take over the container toplevel registration
bussiness now. windows are registered across multiple destructions,
untill they are finalized. the initial implicit reference count
users are holding on windows is removed with the first destruction
though.
(gtk_window_init): ref & sink and set has_user_ref_count, got
rid of gtk_container_register_toplevel() call. add window to
toplevel_list.
(gtk_window_destroy): unref the window if has_user_ref_count
is still set, got rid of call to
gtk_container_unregister_toplevel().
(gtk_window_finalize): remove window from toplevel list.
(gtk_window_list_toplevels): new function to return a newly
created list with referenced toplevels.
(gtk_window_read_rcfiles): use gtk_window_list_toplevels().
* gtk/gtkhscale.c (gtk_hscale_class_init): made the GtkRange
adjustment a non-construct arg.
* gtk/gtkvscale.c (gtk_vscale_class_init): likewise.
* gtk/gtkhscrollbar.c (gtk_vscrollbar_class_init): likewise.
* gtk/gtkvscrollbar.c (gtk_vscrollbar_class_init): likewise.
* gtk/gtkrange.c: added some realized checks.
(gtk_range_destroy): get rid of the h/v adjustments in the
destroy handler instead of finalize. remove timer.
(gtk_range_get_adjustment): demand create adjustment.
* gtk/gtkviewport.c: made h/v adjustment non-construct args.
we simply create them on demand now and get rid of them in
the destroy handler.
(gtk_viewport_destroy): get rid of the h/v adjustments in the
destroy handler instead of finalize.
(gtk_viewport_get_hadjustment):
(gtk_viewport_get_vadjustment):
(gtk_viewport_size_allocate): demand create h/v adjustment
if required.
* gtk/gtkwidget.c (gtk_widget_finalize): duplicate part of the
gtk_widget_real_destroy () functionality.
(gtk_widget_real_destroy): reinitialize with a new style, instead
of setting widget->style to NULL.
Fri May 5 13:02:09 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcalendar.c:
* gtk/gtkbutton.c: ported _get_type() implementation over to
GType, either to preserve memchunks allocation facilities,
or because Gtk+ 1.0 GtkTypeInfo was still being used.
* gtk/gtkobject.[hc]: derive from GObject. ported various functions
over. prepare for ::destroy to be emitted multiple times.
removed reference tracer magic. chain into GObjectClass.shutdown()
to emit ::destroy signal.
* gtk/gtksignal.c: removed assumptions about GTK_TYPE_OBJECT being
fundamental.
* gtk/gtkmain.c: removed gtk_object_post_arg_parsing_init()
cludge.
* gtk/gtksocket.c:
* gtk/gtkplug.c:
* gtk/gtklayout.c:
* gtk/gtklabel.c:
* gtk/gtkargcollector.c:
* gtk/gtkarg.c: various fixups to work with GTK_TYPE_OBJECT
not being a fundamental anymore, and to work with the new
type system (nuked fundamental type varargs clutter).
* gtk/*.c: install finalize handlers in the GObjectClass
part of the class structure.
changed direct GTK_OBJECT()->klass accesses to
GTK_*_GET_CLASS().
changed direct object_class->type accesses to GTK_CLASS_TYPE().
* gtktypeutils.[hc]: use the reserved fundamental ids provided by
GType. made most of the GTK_*() type macros and Gtk* typedefs
simple wrappers around macros and types provided by GType.
most notably, a significant portion of the old API vanished:
GTK_TYPE_MAKE(),
GTK_TYPE_SEQNO(),
GTK_TYPE_FLAT_FIRST, GTK_TYPE_FLAT_LAST,
GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST,
GTK_TYPE_ARGS,
GTK_TYPE_CALLBACK,
GTK_TYPE_C_CALLBACK,
GTK_TYPE_FOREIGN,
GtkTypeQuery,
gtk_type_query(),
gtk_type_set_varargs_type(),
gtk_type_get_varargs_type(),
gtk_type_check_object_cast(),
gtk_type_check_class_cast(),
gtk_type_describe_tree(),
gtk_type_describe_heritage(),
gtk_type_free(),
gtk_type_children_types(),
gtk_type_set_chunk_alloc(),
gtk_type_register_enum(),
gtk_type_register_flags(),
gtk_type_parent_class().
replacements, where available are described in ../docs/Changes-1.4.txt.
implemented compatibility functions for the remaining API.
* configure.in: depend on glib 1.3.1, use gobject module.
2000-05-12 15:25:50 +00:00
|
|
|
|
2001-03-21 18:58:28 +00:00
|
|
|
void gtk_window_add_mnemonic (GtkWindow *window,
|
|
|
|
guint keyval,
|
|
|
|
GtkWidget *target);
|
|
|
|
void gtk_window_remove_mnemonic (GtkWindow *window,
|
|
|
|
guint keyval,
|
|
|
|
GtkWidget *target);
|
2001-04-01 07:32:41 +00:00
|
|
|
gboolean gtk_window_mnemonic_activate (GtkWindow *window,
|
2001-03-21 18:58:28 +00:00
|
|
|
guint keyval,
|
|
|
|
GdkModifierType modifier);
|
|
|
|
void gtk_window_set_mnemonic_modifier (GtkWindow *window,
|
|
|
|
GdkModifierType modifier);
|
2001-06-24 15:34:48 +00:00
|
|
|
GdkModifierType gtk_window_get_mnemonic_modifier (GtkWindow *window);
|
2001-03-21 18:58:28 +00:00
|
|
|
|
2001-02-27 20:40:15 +00:00
|
|
|
void gtk_window_present (GtkWindow *window);
|
|
|
|
void gtk_window_iconify (GtkWindow *window);
|
|
|
|
void gtk_window_deiconify (GtkWindow *window);
|
|
|
|
void gtk_window_stick (GtkWindow *window);
|
|
|
|
void gtk_window_unstick (GtkWindow *window);
|
|
|
|
void gtk_window_maximize (GtkWindow *window);
|
|
|
|
void gtk_window_unmaximize (GtkWindow *window);
|
|
|
|
|
2001-03-29 21:17:45 +00:00
|
|
|
void gtk_window_begin_resize_drag (GtkWindow *window,
|
|
|
|
GdkWindowEdge edge,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
|
|
|
void gtk_window_begin_move_drag (GtkWindow *window,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
|
|
|
|
2001-03-29 23:02:30 +00:00
|
|
|
#ifndef GTK_DISABLE_DEPRECATED
|
|
|
|
void gtk_window_set_policy (GtkWindow *window,
|
|
|
|
gint allow_shrink,
|
|
|
|
gint allow_grow,
|
|
|
|
gint auto_shrink);
|
2001-08-23 15:26:49 +00:00
|
|
|
#define gtk_window_position gtk_window_set_position
|
|
|
|
#endif /* GTK_DISABLE_DEPRECATED */
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
|
|
|
|
/* Set initial default size of the window (does not constrain user
|
|
|
|
* resize operations)
|
2001-03-29 23:02:30 +00:00
|
|
|
*/
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
void gtk_window_set_default_size (GtkWindow *window,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void gtk_window_get_default_size (GtkWindow *window,
|
|
|
|
gint *width,
|
|
|
|
gint *height);
|
|
|
|
void gtk_window_resize (GtkWindow *window,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void gtk_window_get_size (GtkWindow *window,
|
|
|
|
gint *width,
|
|
|
|
gint *height);
|
|
|
|
void gtk_window_move (GtkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
|
|
|
void gtk_window_get_position (GtkWindow *window,
|
2001-09-08 06:24:46 +00:00
|
|
|
gint *root_x,
|
|
|
|
gint *root_y);
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
gboolean gtk_window_parse_geometry (GtkWindow *window,
|
|
|
|
const gchar *geometry);
|
|
|
|
|
|
|
|
/* Ignore this unless you are writing a GUI builder */
|
|
|
|
void gtk_window_reshow_with_initial_size (GtkWindow *window);
|
2001-01-08 17:04:17 +00:00
|
|
|
|
2001-06-14 21:44:01 +00:00
|
|
|
/* Window groups
|
|
|
|
*/
|
2001-09-19 00:58:09 +00:00
|
|
|
GType gtk_window_group_get_type (void) G_GNUC_CONST;
|
2001-06-14 21:44:01 +00:00
|
|
|
|
|
|
|
GtkWindowGroup * gtk_window_group_new (void);
|
|
|
|
void gtk_window_group_add_window (GtkWindowGroup *window_group,
|
|
|
|
GtkWindow *window);
|
|
|
|
void gtk_window_group_remove_window (GtkWindowGroup *window_group,
|
|
|
|
GtkWindow *window);
|
|
|
|
|
1999-02-21 19:01:08 +00:00
|
|
|
/* --- internal functions --- */
|
2001-11-17 01:18:49 +00:00
|
|
|
void _gtk_window_internal_set_focus (GtkWindow *window,
|
2001-06-14 21:44:01 +00:00
|
|
|
GtkWidget *focus);
|
|
|
|
void gtk_window_remove_embedded_xid (GtkWindow *window,
|
|
|
|
guint xid);
|
|
|
|
void gtk_window_add_embedded_xid (GtkWindow *window,
|
|
|
|
guint xid);
|
|
|
|
void _gtk_window_reposition (GtkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
|
|
|
void _gtk_window_constrain_size (GtkWindow *window,
|
|
|
|
gint width,
|
|
|
|
gint height,
|
|
|
|
gint *new_width,
|
|
|
|
gint *new_height);
|
|
|
|
GtkWindowGroup *_gtk_window_get_group (GtkWindow *window);
|
2002-02-21 22:03:09 +00:00
|
|
|
gboolean _gtk_window_activate_key (GtkWindow *window,
|
|
|
|
GdkEventKey *event);
|
1998-11-24 04:45:29 +00:00
|
|
|
|
2002-02-24 01:52:14 +00:00
|
|
|
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
|
|
|
|
guint keyval,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
gboolean is_mnemonic,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
void _gtk_window_keys_foreach (GtkWindow *window,
|
|
|
|
GtkWindowKeysForeachFunc func,
|
|
|
|
gpointer func_data);
|
|
|
|
|
added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org>
* added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org>
* gtk/maketypes.awk: fix type utils generation on unix.
* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
registry.
* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
introduced ::accel_changed signal for change notification, and
gtk_accel_group_connect/disconnect to connect closures to accel groups.
made gtk_accel_group_attach/detach and gtk_accel_group_activate private
functions.
deprecated gtk_accel_group_ref/unref.
* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
to accel group changed notification and basically operate on closures.
removed gtk_accel_label_get_accel_object and
gtk_accel_label_set_accel_object.
introduced gtk_accel_label_set_accel_closure, and for convenience,
gtk_accel_label_set_accel_widget.
* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
which mostly moved into gtkaccelmap.[hc].
removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
and gtk_item_factory_print_func.
* gtk/gtkmain.c: call _gtk_accel_map_init().
* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
that associates an accelerator path with menu items, through which
persistent accelerator settings on menu items are enabled.
* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
paths of menu item can be default constructed to allow installation
of accelerators on menu items that don't come with an accelerator
binding by default.
* gtk/gtksettings.c: fix STRING type rc settings by special casing
them appropriately in the parser.
* gtk/gtksignal.[hc]: allow a class function offset of 0 for
gtk_signal_newv().
* gtk/gtkwidget.[hc]: accelerator API revamp.
removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
gtk_widget_(un)lock_accelerators.
accelerators maintained through gtk_widget_add/remove_accelerator()
are not runtime changable now, the correct sequence to setup a
widget for runtime changable accelerators is now:
gtk_accel_map_add_entry(accel_path, key, mods);
_gtk_widget_set_accel_path(widget, accel_path, accel_group);
* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
group changes (as well as mnemonic changes) through the new signal
::accels_changed.
Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org>
* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
GString->string conversions.
2001-11-13 00:53:47 +00:00
|
|
|
/* --- internal (GtkAcceleratable) --- */
|
|
|
|
gboolean _gtk_window_query_nonaccels (GtkWindow *window,
|
|
|
|
guint accel_key,
|
|
|
|
GdkModifierType accel_mods);
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GTK_WINDOW_H__ */
|