Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
f53ad339
Commit
f53ad339
authored
Sep 18, 2010
by
Matthias Clasen
Browse files
Remove GtkObject completely
parent
eac1959d
Changes
71
Hide whitespace changes
Inline
Side-by-side
docs/reference/gtk/gtk3.types
View file @
f53ad339
...
...
@@ -93,7 +93,6 @@ gtk_message_dialog_get_type
gtk_misc_get_type
gtk_mount_operation_get_type
gtk_notebook_get_type
gtk_object_get_type
gtk_offscreen_window_get_type
gtk_orientable_get_type
gtk_page_setup_get_type
...
...
gtk/Makefile.am
View file @
f53ad339
...
...
@@ -244,7 +244,6 @@ gtk_public_h_sources = \
gtkmodules.h
\
gtkmountoperation.h
\
gtknotebook.h
\
gtkobject.h
\
gtkoffscreenwindow.h
\
gtkorientable.h
\
gtkpagesetup.h
\
...
...
@@ -512,7 +511,6 @@ gtk_base_c_sources = \
gtkmodules.c
\
gtkmountoperation.c
\
gtknotebook.c
\
gtkobject.c
\
gtkoffscreenwindow.c
\
gtkorientable.c
\
gtkpagesetup.c
\
...
...
gtk/gtk.h
View file @
f53ad339
...
...
@@ -127,7 +127,6 @@
#include
<gtk/gtkmodules.h>
#include
<gtk/gtkmountoperation.h>
#include
<gtk/gtknotebook.h>
#include
<gtk/gtkobject.h>
#include
<gtk/gtkoffscreenwindow.h>
#include
<gtk/gtkorientable.h>
#include
<gtk/gtkpagesetup.h>
...
...
gtk/gtk.symbols
View file @
f53ad339
...
...
@@ -2067,13 +2067,6 @@ gtk_notebook_set_action_widget
#endif
#endif
#if IN_HEADER(__GTK_OBJECT_H__)
#if IN_FILE(__GTK_OBJECT_C__)
gtk_object_destroy
gtk_object_get_type G_GNUC_CONST
#endif
#endif
#if IN_HEADER(__GTK_OFFSCREEN_WINDOW_H__)
#if IN_FILE(__GTK_OFFSCREEN_WINDOW_C__)
gtk_offscreen_window_get_type G_GNUC_CONST
...
...
@@ -4361,6 +4354,7 @@ gtk_widget_get_margin_top
gtk_widget_set_margin_top
gtk_widget_get_margin_bottom
gtk_widget_set_margin_bottom
gtk_widget_in_destruction
#endif
#endif
...
...
gtk/gtkadjustment.h
View file @
f53ad339
...
...
@@ -31,7 +31,6 @@
#ifndef __GTK_ADJUSTMENT_H__
#define __GTK_ADJUSTMENT_H__
#include
<gtk/gtkobject.h>
#include
<gdk/gdk.h>
G_BEGIN_DECLS
...
...
gtk/gtkarrow.c
View file @
f53ad339
...
...
@@ -48,6 +48,7 @@
#include
<math.h>
#include
"gtkarrow.h"
#include
"gtksizerequest.h"
#include
"gtktypeutils.h"
#include
"gtkprivate.h"
#include
"gtkintl.h"
...
...
gtk/gtkbbox.c
View file @
f53ad339
...
...
@@ -51,6 +51,7 @@
#include
"gtkorientable.h"
#include
"gtkprivate.h"
#include
"gtksizerequest.h"
#include
"gtktypeutils.h"
#include
"gtkintl.h"
...
...
gtk/gtkbindings.c
View file @
f53ad339
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* GtkBindingSet: Keybinding manager for G
tk
Objects.
* GtkBindingSet: Keybinding manager for GObjects.
* Copyright (C) 1998 Tim Janik
*
* This library is free software; you can redistribute it and/or
...
...
@@ -34,6 +34,7 @@
#include
"gtkbindings.h"
#include
"gtkkeyhash.h"
#include
"gtktypeutils.h"
#include
"gtkwidget.h"
#include
"gtkrc.h"
...
...
@@ -340,7 +341,7 @@ binding_ht_lookup_entry (GtkBindingSet *set,
}
static
gboolean
binding_compose_params
(
G
tk
Object
*
object
,
binding_compose_params
(
GObject
*
object
,
GtkBindingArg
*
args
,
GSignalQuery
*
query
,
GValue
**
params_p
)
...
...
@@ -469,7 +470,7 @@ binding_compose_params (GtkObject *object,
static
gboolean
gtk_binding_entry_activate
(
GtkBindingEntry
*
entry
,
G
tk
Object
*
object
)
GObject
*
object
)
{
GtkBindingSignal
*
sig
;
gboolean
old_emission
;
...
...
@@ -593,7 +594,7 @@ gtk_binding_set_new (const gchar *set_name)
/**
* gtk_binding_set_by_class:
* @object_class: a valid #G
tk
Object class
* @object_class: a valid #GObject class
*
* This function returns the binding set named after the type name of
* the passed in class structure. New binding sets are created on
...
...
@@ -604,10 +605,10 @@ gtk_binding_set_new (const gchar *set_name)
GtkBindingSet
*
gtk_binding_set_by_class
(
gpointer
object_class
)
{
G
tk
ObjectClass
*
class
=
object_class
;
GObjectClass
*
class
=
object_class
;
GtkBindingSet
*
binding_set
;
g_return_val_if_fail
(
G
TK
_IS_OBJECT_CLASS
(
class
),
NULL
);
g_return_val_if_fail
(
G_IS_OBJECT_CLASS
(
class
),
NULL
);
if
(
!
key_id_class_binding_set
)
key_id_class_binding_set
=
g_quark_from_static_string
(
key_class_binding_set
);
...
...
@@ -671,12 +672,12 @@ gboolean
gtk_binding_set_activate
(
GtkBindingSet
*
binding_set
,
guint
keyval
,
GdkModifierType
modifiers
,
G
tk
Object
*
object
)
GObject
*
object
)
{
GtkBindingEntry
*
entry
;
g_return_val_if_fail
(
binding_set
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
G
TK
_IS_OBJECT
(
object
),
FALSE
);
g_return_val_if_fail
(
G_IS_OBJECT
(
object
),
FALSE
);
keyval
=
gdk_keyval_to_lower
(
keyval
);
modifiers
=
modifiers
&
BINDING_MOD_MASK
();
...
...
@@ -1052,7 +1053,7 @@ gtk_binding_set_add_path (GtkBindingSet *binding_set,
static
gboolean
binding_match_activate
(
GSList
*
pspec_list
,
G
tk
Object
*
object
,
GObject
*
object
,
guint
path_length
,
gchar
*
path
,
gchar
*
path_reversed
,
...
...
@@ -1170,7 +1171,7 @@ gtk_binding_entries_sort_patterns (GSList *entries,
}
static
gboolean
gtk_bindings_activate_list
(
G
tk
Object
*
object
,
gtk_bindings_activate_list
(
GObject
*
object
,
GSList
*
entries
,
gboolean
is_release
)
{
...
...
@@ -1264,7 +1265,7 @@ gtk_bindings_activate_list (GtkObject *object,
* Return value: %TRUE if a binding was found and activated
*/
gboolean
gtk_bindings_activate
(
G
tk
Object
*
object
,
gtk_bindings_activate
(
GObject
*
object
,
guint
keyval
,
GdkModifierType
modifiers
)
{
...
...
@@ -1274,8 +1275,6 @@ gtk_bindings_activate (GtkObject *object,
gboolean
handled
=
FALSE
;
gboolean
is_release
;
g_return_val_if_fail
(
GTK_IS_OBJECT
(
object
),
FALSE
);
if
(
!
GTK_IS_WIDGET
(
object
))
return
FALSE
;
...
...
@@ -1296,7 +1295,7 @@ gtk_bindings_activate (GtkObject *object,
/**
* gtk_bindings_activate_event:
* @object: a #G
tk
Object (generally must be a widget)
* @object: a #GObject (generally must be a widget)
* @event: a #GdkEventKey
*
* Looks up key bindings for @object to find one matching
...
...
@@ -1307,7 +1306,7 @@ gtk_bindings_activate (GtkObject *object,
* Since: 2.4
*/
gboolean
gtk_bindings_activate_event
(
G
tk
Object
*
object
,
gtk_bindings_activate_event
(
GObject
*
object
,
GdkEventKey
*
event
)
{
GSList
*
entries
=
NULL
;
...
...
@@ -1315,8 +1314,6 @@ gtk_bindings_activate_event (GtkObject *object,
GtkKeyHash
*
key_hash
;
gboolean
handled
=
FALSE
;
g_return_val_if_fail
(
GTK_IS_OBJECT
(
object
),
FALSE
);
if
(
!
GTK_IS_WIDGET
(
object
))
return
FALSE
;
...
...
gtk/gtkbindings.h
View file @
f53ad339
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* GtkBindingSet: Keybinding manager for G
tk
Objects.
* GtkBindingSet: Keybinding manager for GObjects.
* Copyright (C) 1998 Tim Janik
*
* This library is free software; you can redistribute it and/or
...
...
@@ -36,8 +36,7 @@
#include
<gdk/gdk.h>
#include
<gtk/gtkobject.h>
#include
<gtk/gtkenums.h>
G_BEGIN_DECLS
...
...
@@ -101,15 +100,15 @@ struct _GtkBindingSignal
GtkBindingSet
*
gtk_binding_set_new
(
const
gchar
*
set_name
);
GtkBindingSet
*
gtk_binding_set_by_class
(
gpointer
object_class
);
GtkBindingSet
*
gtk_binding_set_find
(
const
gchar
*
set_name
);
gboolean
gtk_bindings_activate
(
G
tk
Object
*
object
,
gboolean
gtk_bindings_activate
(
GObject
*
object
,
guint
keyval
,
GdkModifierType
modifiers
);
gboolean
gtk_bindings_activate_event
(
G
tk
Object
*
object
,
gboolean
gtk_bindings_activate_event
(
GObject
*
object
,
GdkEventKey
*
event
);
gboolean
gtk_binding_set_activate
(
GtkBindingSet
*
binding_set
,
guint
keyval
,
GdkModifierType
modifiers
,
G
tk
Object
*
object
);
GObject
*
object
);
void
gtk_binding_entry_skip
(
GtkBindingSet
*
binding_set
,
guint
keyval
,
...
...
gtk/gtkbox.c
View file @
f53ad339
...
...
@@ -78,6 +78,7 @@
#include
"gtkbox.h"
#include
"gtkorientable.h"
#include
"gtksizerequest.h"
#include
"gtktypeutils.h"
#include
"gtkprivate.h"
#include
"gtkintl.h"
...
...
gtk/gtkbuilder.c
View file @
f53ad339
...
...
@@ -246,6 +246,7 @@
#include
"gtkbuilder.h"
#include
"gtkbuildable.h"
#include
"gtkbuilderprivate.h"
#include
"gtkdebug.h"
#include
"gtkmain.h"
#include
"gtkintl.h"
#include
"gtkprivate.h"
...
...
gtk/gtkcellrendererspinner.c
View file @
f53ad339
...
...
@@ -32,6 +32,7 @@
#include
"gtkcellrendererspinner.h"
#include
"gtkiconfactory.h"
#include
"gtkicontheme.h"
#include
"gtktypeutils.h"
#include
"gtkintl.h"
...
...
gtk/gtkcombobox.c
View file @
f53ad339
...
...
@@ -1283,7 +1283,7 @@ gtk_combo_box_remove (GtkContainer *container,
gtk_widget_unparent
(
widget
);
_gtk_bin_set_child
(
GTK_BIN
(
container
),
NULL
);
if
(
GTK_OBJECT_FLAGS
(
combo_box
)
&
GTK_IN_DESTRUCTION
)
if
(
gtk_widget_in_destruction
(
combo_box
)
)
return
;
gtk_widget_queue_resize
(
GTK_WIDGET
(
container
));
...
...
@@ -3964,12 +3964,12 @@ gtk_combo_box_menu_key_press (GtkWidget *widget,
{
GtkComboBox
*
combo_box
=
GTK_COMBO_BOX
(
data
);
if
(
!
gtk_bindings_activate_event
(
G
TK
_OBJECT
(
widget
),
event
))
if
(
!
gtk_bindings_activate_event
(
G_OBJECT
(
widget
),
event
))
{
/* The menu hasn't managed the
* event, forward it to the combobox
*/
gtk_bindings_activate_event
(
G
TK
_OBJECT
(
combo_box
),
event
);
gtk_bindings_activate_event
(
G_OBJECT
(
combo_box
),
event
);
}
return
TRUE
;
...
...
@@ -4003,12 +4003,12 @@ gtk_combo_box_list_key_press (GtkWidget *widget,
return
TRUE
;
}
if
(
!
gtk_bindings_activate_event
(
G
TK
_OBJECT
(
widget
),
event
))
if
(
!
gtk_bindings_activate_event
(
G_OBJECT
(
widget
),
event
))
{
/* The list hasn't managed the
* event, forward it to the combobox
*/
gtk_bindings_activate_event
(
G
TK
_OBJECT
(
combo_box
),
event
);
gtk_bindings_activate_event
(
G_OBJECT
(
combo_box
),
event
);
}
return
TRUE
;
...
...
gtk/gtkcontainer.c
View file @
f53ad339
...
...
@@ -1086,7 +1086,7 @@ gtk_container_destroy (GtkWidget *widget)
GtkContainer
*
container
=
GTK_CONTAINER
(
widget
);
GtkContainerPrivate
*
priv
=
container
->
priv
;
if
(
GTK_CONTAINER_RESIZE_PENDING
(
container
))
if
(
_gtk_widget_get_resize_pending
(
GTK_WIDGET
(
container
))
)
_gtk_container_dequeue_resize_handler
(
container
);
if
(
priv
->
focus_child
)
...
...
@@ -1278,10 +1278,10 @@ void
_gtk_container_dequeue_resize_handler
(
GtkContainer
*
container
)
{
g_return_if_fail
(
GTK_IS_CONTAINER
(
container
));
g_return_if_fail
(
GTK_CONTAINER_RESIZE_PENDING
(
container
));
g_return_if_fail
(
_gtk_widget_get_resize_pending
(
GTK_WIDGET
(
container
))
)
;
container_resize_queue
=
g_slist_remove
(
container_resize_queue
,
container
);
GTK_PRIVATE_UNSET_FLAG
(
container
,
GTK_RESIZE_PENDING
);
_gtk_widget_set_resize_pending
(
GTK_WIDGET
(
container
)
,
FALSE
);
}
/**
...
...
@@ -1392,7 +1392,7 @@ gtk_container_idle_sizer (gpointer data)
widget
=
slist
->
data
;
g_slist_free_1
(
slist
);
GTK_PRIVATE_UNSET_FLAG
(
widget
,
GTK_RESIZE_PENDING
);
_gtk_widget_set_resize_pending
(
widget
,
FALSE
);
gtk_container_check_resize
(
GTK_CONTAINER
(
widget
));
}
...
...
@@ -1418,9 +1418,9 @@ _gtk_container_queue_resize (GtkContainer *container)
while
(
TRUE
)
{
GTK_PRIVATE_SET_FLAG
(
widget
,
GTK_ALLOC_NEEDED
);
GTK_PRIVATE_SET_FLAG
(
widget
,
GTK_WIDTH_REQUEST_NEEDED
);
GTK_PRIVATE_SET_FLAG
(
widget
,
GTK_HEIGHT_REQUEST_NEEDED
);
_gtk_widget_set_alloc_needed
(
widget
,
TRUE
);
_gtk_widget_set_width_request_needed
(
widget
,
TRUE
);
_gtk_widget_set_height_request_needed
(
widget
,
TRUE
);
if
((
resize_container
&&
widget
==
GTK_WIDGET
(
resize_container
))
||
!
(
parent
=
gtk_widget_get_parent
(
widget
)))
...
...
@@ -1438,9 +1438,9 @@ _gtk_container_queue_resize (GtkContainer *container)
switch
(
resize_container
->
priv
->
resize_mode
)
{
case
GTK_RESIZE_QUEUE
:
if
(
!
GTK_CONTAINER_RESIZE_PENDING
(
resize_container
))
if
(
!
_gtk_widget_get_resize_pending
(
GTK_WIDGET
(
resize_container
))
)
{
GTK_PRIVATE_SET_FLAG
(
resize_container
,
GTK_RESIZE_PENDING
);
_gtk_widget_set_resize_pending
(
GTK_WIDGET
(
resize_container
)
,
TRUE
);
if
(
container_resize_queue
==
NULL
)
gdk_threads_add_idle_full
(
GTK_PRIORITY_RESIZE
,
gtk_container_idle_sizer
,
...
...
gtk/gtkexpander.c
View file @
f53ad339
...
...
@@ -608,7 +608,7 @@ gtk_expander_size_allocate (GtkWidget *widget,
child_ypad
=
2
*
border_width
+
priv
->
spacing
+
(
interior_focus
?
0
:
2
*
focus_width
+
2
*
focus_pad
);
top_min_height
=
2
*
expander_spacing
+
expander_size
;
child_visible
=
(
child
&&
GTK_WIDGET_CHILD_VISIBLE
(
child
));
child_visible
=
(
child
&&
gtk_widget_get_child_visible
(
child
));
if
(
priv
->
label_widget
&&
gtk_widget_get_visible
(
priv
->
label_widget
))
{
...
...
@@ -1103,7 +1103,7 @@ focus_in_site (GtkExpander *expander,
{
GtkWidget
*
child
=
gtk_bin_get_child
(
GTK_BIN
(
expander
));
if
(
child
&&
GTK_WIDGET_CHILD_VISIBLE
(
child
))
if
(
child
&&
gtk_widget_get_child_visible
(
child
))
return
gtk_widget_child_focus
(
child
,
direction
);
else
return
FALSE
;
...
...
@@ -1312,7 +1312,7 @@ gtk_expander_get_preferred_width (GtkWidget *widget,
*
natural_size
+=
label_nat
;
}
if
(
child
&&
GTK_WIDGET_CHILD_VISIBLE
(
child
))
if
(
child
&&
gtk_widget_get_child_visible
(
child
))
{
gint
child_min
,
child_nat
;
...
...
@@ -1382,7 +1382,7 @@ gtk_expander_get_preferred_height (GtkWidget *widget,
*
natural_size
+=
extra
;
}
if
(
child
&&
GTK_WIDGET_CHILD_VISIBLE
(
child
))
if
(
child
&&
gtk_widget_get_child_visible
(
child
))
{
gint
child_min
,
child_nat
;
...
...
@@ -1457,7 +1457,7 @@ gtk_expander_get_preferred_height_for_width (GtkWidget *widget,
*
natural_height
+=
extra
;
}
if
(
child
&&
GTK_WIDGET_CHILD_VISIBLE
(
child
))
if
(
child
&&
gtk_widget_get_child_visible
(
child
))
{
gint
child_min
,
child_nat
;
...
...
gtk/gtkhsv.c
View file @
f53ad339
...
...
@@ -39,6 +39,7 @@
#include
"gtkhsv.h"
#include
"gtkbindings.h"
#include
"gtkmarshalers.h"
#include
"gtktypeutils.h"
#include
"gtkintl.h"
/* Default width/height */
...
...
gtk/gtkicontheme.c
View file @
f53ad339
...
...
@@ -39,6 +39,7 @@
#endif
/* G_OS_WIN32 */
#include
"gtkicontheme.h"
#include
"gtkdebug.h"
#include
"gtkiconfactory.h"
#include
"gtkiconcache.h"
#include
"gtkbuiltincache.h"
...
...
gtk/gtkimcontext.h
View file @
f53ad339
...
...
@@ -26,7 +26,6 @@
#include
<gdk/gdk.h>
#include
<gtk/gtkobject.h>
G_BEGIN_DECLS
...
...
gtk/gtkimcontextsimple.c
View file @
f53ad339
...
...
@@ -27,6 +27,7 @@
#include
"gtkimcontextsimple.h"
#include
"gtksettings.h"
#include
"gtkwidget.h"
#include
"gtkdebug.h"
#include
"gtkintl.h"
...
...
gtk/gtkinvisible.c
View file @
f53ad339
...
...
@@ -263,7 +263,7 @@ gtk_invisible_style_set (GtkWidget *widget,
static
void
gtk_invisible_show
(
GtkWidget
*
widget
)
{
GTK_WIDGET_SET_FLAGS
(
widget
,
GTK_VISIBL
E
);
_gtk_widget_set_visible_flag
(
widget
,
TRU
E
);
gtk_widget_map
(
widget
);
}
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment