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;
|
|
|
|
GtkWindowType type : 4;
|
|
|
|
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;
|
|
|
|
|
2001-03-29 23:02:30 +00:00
|
|
|
GdkWindowTypeHint type_hint : 3;
|
|
|
|
GdkGravity gravity : 5;
|
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;
|
2001-03-21 18:58:28 +00:00
|
|
|
|
|
|
|
GdkModifierType mnemonic_modifier;
|
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);
|
|
|
|
gboolean (* frame_event) (GtkWidget *widget,
|
|
|
|
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,
|
|
|
|
GtkDirectionType direction);
|
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;
|
|
|
|
};
|
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);
|
|
|
|
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
|
|
|
|
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-04-26 14:42:41 +00:00
|
|
|
#endif
|
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,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
GType gtk_window_group_get_type (void) G_GNUC_CONST;;
|
|
|
|
|
|
|
|
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-06-14 21:44:01 +00:00
|
|
|
void gtk_window_set_focus (GtkWindow *window,
|
|
|
|
GtkWidget *focus);
|
|
|
|
void gtk_window_set_default (GtkWindow *window,
|
|
|
|
GtkWidget *defaultw);
|
|
|
|
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);
|
1998-11-24 04:45:29 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GTK_WINDOW_H__ */
|