mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Add properties decorated and gravity. (#80234)
2003-07-18 Matthias Clasen <maclas@gmx.de> * gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
This commit is contained in:
parent
eaae0a6b61
commit
7fa902f60b
@ -1,5 +1,7 @@
|
||||
2003-07-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
|
||||
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
|
||||
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2003-07-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
|
||||
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
|
||||
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2003-07-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
|
||||
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
|
||||
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2003-07-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
|
||||
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
|
||||
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2003-07-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkwindow.c: Add properties decorated and gravity. (#80234)
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
|
||||
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
|
||||
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
|
||||
|
@ -73,6 +73,8 @@ enum {
|
||||
PROP_TYPE_HINT,
|
||||
PROP_SKIP_TASKBAR_HINT,
|
||||
PROP_SKIP_PAGER_HINT,
|
||||
PROP_DECORATED,
|
||||
PROP_GRAVITY,
|
||||
|
||||
/* Readonly properties */
|
||||
PROP_IS_ACTIVE,
|
||||
@ -459,7 +461,6 @@ gtk_window_class_init (GtkWindowClass *klass)
|
||||
GTK_TYPE_WINDOW_TYPE,
|
||||
GTK_WINDOW_TOPLEVEL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
/* Regular Props */
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_TITLE,
|
||||
@ -604,6 +605,38 @@ gtk_window_class_init (GtkWindowClass *klass)
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkWindow:decorated:
|
||||
*
|
||||
* Whether the window should be decorated by the window manager.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DECORATED,
|
||||
g_param_spec_boolean ("decorated",
|
||||
_("Decorated"),
|
||||
_("Whether the window should be decorated by the window manager"),
|
||||
TRUE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkWindow:gravity:
|
||||
*
|
||||
* The window gravity of the window. See gtk_window_move() and #GdkGravity for
|
||||
* more details about window gravity.
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_GRAVITY,
|
||||
g_param_spec_enum ("gravity",
|
||||
_("Gravity"),
|
||||
_("The window gravity of the window"),
|
||||
GDK_TYPE_GRAVITY,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
window_signals[SET_FOCUS] =
|
||||
g_signal_new ("set_focus",
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
@ -823,7 +856,12 @@ gtk_window_set_property (GObject *object,
|
||||
gtk_window_set_skip_pager_hint (window,
|
||||
g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
case PROP_DECORATED:
|
||||
gtk_window_set_decorated (window, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_GRAVITY:
|
||||
gtk_window_set_gravity (window, g_value_get_enum (value));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -907,6 +945,12 @@ gtk_window_get_property (GObject *object,
|
||||
g_value_set_boolean (value,
|
||||
gtk_window_get_skip_pager_hint (window));
|
||||
break;
|
||||
case PROP_DECORATED:
|
||||
g_value_set_boolean (value, gtk_window_get_decorated (window));
|
||||
break;
|
||||
case PROP_GRAVITY:
|
||||
g_value_set_enum (value, gtk_window_get_gravity (window));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -2223,6 +2267,8 @@ gtk_window_set_decorated (GtkWindow *window,
|
||||
gdk_window_set_decorations (GTK_WIDGET (window)->window,
|
||||
0);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (window), "decorated");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5455,7 +5501,7 @@ gtk_window_expose (GtkWidget *widget,
|
||||
* If this function is called on a window with setting of %TRUE, before
|
||||
* it is realized or showed, it will have a "frame" window around
|
||||
* @window->window, accessible in @window->frame. Using the signal
|
||||
* frame_event you can recieve all events targeted at the frame.
|
||||
* frame_event you can receive all events targeted at the frame.
|
||||
*
|
||||
* This function is used by the linux-fb port to implement managed
|
||||
* windows, but it could concievably be used by X-programs that
|
||||
@ -5959,6 +6005,8 @@ gtk_window_set_gravity (GtkWindow *window,
|
||||
/* gtk_window_move_resize() will adapt gravity
|
||||
*/
|
||||
gtk_widget_queue_resize (GTK_WIDGET (window));
|
||||
|
||||
g_object_notify (G_OBJECT (window), "gravity");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user