Remove sealed members from GtkSettings

This commit is contained in:
Matthias Clasen 2010-12-23 21:55:47 -05:00
parent 433a22cd11
commit 1bcf8a0027
6 changed files with 742 additions and 668 deletions

View File

@ -143,7 +143,7 @@ endif
# GTK+ header files for public installation (non-generated, or generated
# by configure)
gtk_public_h_sources = \
gtk_public_h_sources = \
gtk.h \
gtkaboutdialog.h \
gtkaccelgroup.h \
@ -156,10 +156,10 @@ gtk_public_h_sources = \
gtkadjustment.h \
gtkalignment.h \
gtkappchooser.h \
gtkappchooserbutton.h \
gtkappchooserdialog.h \
gtkappchooserbutton.h \
gtkappchooserwidget.h \
gtkapplication.h \
gtkapplication.h \
gtkarrow.h \
gtkaspectframe.h \
gtkassistant.h \
@ -173,9 +173,9 @@ gtk_public_h_sources = \
gtkbutton.h \
gtkcalendar.h \
gtkcellarea.h \
gtkcellareacontext.h \
gtkcellareabox.h \
gtkcellareaboxcontext.h \
gtkcellareacontext.h \
gtkcelleditable.h \
gtkcelllayout.h \
gtkcellrenderer.h \
@ -272,12 +272,12 @@ gtk_public_h_sources = \
gtkrange.h \
gtkrc.h \
gtkrecentaction.h \
gtkrecentchooser.h \
gtkrecentchooser.h \
gtkrecentchooserdialog.h \
gtkrecentchoosermenu.h \
gtkrecentchooserwidget.h \
gtkrecentfilter.h \
gtkrecentmanager.h \
gtkrecentmanager.h \
gtkscale.h \
gtkscalebutton.h \
gtkscrollable.h \
@ -287,8 +287,8 @@ gtk_public_h_sources = \
gtkseparator.h \
gtkseparatormenuitem.h \
gtkseparatortoolitem.h \
gtkshow.h \
gtksettings.h \
gtkshow.h \
gtksizegroup.h \
gtksizerequest.h \
gtksocket.h \
@ -350,7 +350,7 @@ gtk_public_h_sources = \
gtkwindow.h
if OS_UNIX
gtk_unix_print_public_h_sources = \
gtk_unix_print_public_h_sources = \
gtkpagesetupunixdialog.h \
gtkprintunixdialog.h \
gtkprinter.h \
@ -360,34 +360,32 @@ endif
# Installed header files without compatibility guarantees
# that are not included in gtk/gtk.h
gtk_semi_private_h_sources = \
gtk_semi_private_h_sources = \
gtktextlayout.h
if ENABLE_PACKAGEKIT
gtk_appchooser_impl_h_sources = \
gtkappchooseronlinepk.h \
$(NULL)
gtkappchooseronlinepk.h
endif
if ENABLE_PACKAGEKIT
gtk_appchooser_impl_c_sources = \
gtkappchooseronlinepk.c \
$(NULL)
gtkappchooseronlinepk.c
endif
# GTK+ header files that don't get installed
gtk_private_h_sources = \
gtk9slice.h \
gtk9slice.h \
gtkaccelgroupprivate.h \
gtkanimationdescription.h \
gtkappchooserprivate.h \
gtkappchoosermodule.h \
gtkappchooseronline.h \
gtkbuilderprivate.h \
gtkbuttonprivate.h \
gtkquery.h \
gtksearchengine.h \
gtksearchenginesimple.h \
gtkcustompaperunixdialog.h \
gtkdndcursors.h \
gtkentryprivate.h \
gtkanimationdescription.h \
gtkbuilderprivate.h \
gtkcustompaperunixdialog.h\
gtkfilechooserdefault.h \
gtkfilechooserembed.h \
gtkfilechooserentry.h \
@ -404,24 +402,25 @@ gtk_private_h_sources = \
gtkmnemonichash.h \
gtkmodifierstyle.h \
gtkmountoperationprivate.h \
gtkappchooserprivate.h \
gtkappchoosermodule.h \
gtkappchooseronline.h \
gtkpango.h \
gtkpathbar.h \
gtkplugprivate.h \
gtkprintoperation-private.h\
gtkprintoperation-private.h \
gtkprintutils.h \
gtkprivate.h \
gtkquery.h \
gtkrbtree.h \
gtkrecentchooserdefault.h \
gtkrecentchooserprivate.h \
gtkrecentchooserutils.h \
gtkrecentchooserutils.h \
gtksearchengine.h \
gtksearchenginesimple.h \
gtkselectionprivate.h \
gtksettingsprivate.h \
gtksizegroup-private.h \
gtksocketprivate.h \
gtktextbtree.h \
gtktextbufferserialize.h\
gtktextbufferserialize.h \
gtktextchildprivate.h \
gtktextiterprivate.h \
gtktextmarkprivate.h \
@ -429,8 +428,8 @@ gtk_private_h_sources = \
gtktexttagprivate.h \
gtktexttypes.h \
gtktextutil.h \
gtktimeline.h \
gtkthemes.h \
gtktimeline.h \
gtktoolpaletteprivate.h \
gtktreedatalist.h \
gtktreeprivate.h \
@ -440,7 +439,7 @@ gtk_private_h_sources = \
$(gtk_appchooser_impl_h_sources)
# GTK+ C sources to build the library from
gtk_base_c_sources = \
gtk_base_c_sources = \
gtk9slice.c \
gtkquery.c \
gtksearchengine.c \
@ -458,11 +457,11 @@ gtk_base_c_sources = \
gtkalignment.c \
gtkappchooser.c \
gtkappchooserwidget.c \
gtkappchooserbutton.c \
gtkappchooserbutton.c \
gtkappchooserdialog.c \
gtkappchoosermodule.c \
gtkappchooseronline.c \
gtkapplication.c \
gtkapplication.c \
gtkanimationdescription.c \
gtkarrow.c \
gtkaspectframe.c \
@ -488,8 +487,8 @@ gtk_base_c_sources = \
gtkcellrenderercombo.c \
gtkcellrendererpixbuf.c \
gtkcellrendererprogress.c \
gtkcellrendererspin.c \
gtkcellrendererspinner.c\
gtkcellrendererspin.c \
gtkcellrendererspinner.c \
gtkcellrenderertext.c \
gtkcellrenderertoggle.c \
gtkcellview.c \
@ -499,7 +498,7 @@ gtk_base_c_sources = \
gtkcolorsel.c \
gtkcolorseldialog.c \
gtkcombobox.c \
gtkcomboboxtext.c \
gtkcomboboxtext.c \
gtkcontainer.c \
gtkcssprovider.c \
gtkdialog.c \
@ -590,13 +589,13 @@ gtk_base_c_sources = \
gtkrc.c \
gtkrecentaction.c \
gtkrecentchooserdefault.c \
gtkrecentchooserdialog.c\
gtkrecentchooserdialog.c \
gtkrecentchoosermenu.c \
gtkrecentchooserwidget.c\
gtkrecentchooserutils.c \
gtkrecentchooser.c \
gtkrecentfilter.c \
gtkrecentmanager.c \
gtkrecentchooserwidget.c \
gtkrecentchooserutils.c \
gtkrecentchooser.c \
gtkrecentfilter.c \
gtkrecentmanager.c \
gtkscale.c \
gtkscalebutton.c \
gtkscrollable.c \
@ -628,7 +627,7 @@ gtk_base_c_sources = \
gtktextbtree.c \
gtktextbuffer.c \
gtktextbufferrichtext.c \
gtktextbufferserialize.c\
gtktextbufferserialize.c \
gtktextchild.c \
gtktextdisplay.c \
gtktextiter.c \
@ -683,7 +682,7 @@ gtk_base_c_sources = \
gtk_c_sources = $(gtk_base_c_sources)
gtk_all_c_sources = $(gtk_base_c_sources)
gtk_os_unix_c_sources = \
gtk_os_unix_c_sources = \
gtkcustompaperunixdialog.c \
gtkpagesetupunixdialog.c \
gtkprinter.c \
@ -719,38 +718,44 @@ gtk_private_h_sources += gtkprint-win32.h
gtk_c_sources += $(gtk_os_win32_c_sources)
endif
gtk_use_x11_c_sources = \
gtkplug-x11.c \
gtksocket-x11.c \
gtkxembed.c \
gtktrayicon-x11.c \
gtk_use_x11_c_sources = \
gtkplug-x11.c \
gtksocket-x11.c \
gtkxembed.c \
gtktrayicon-x11.c \
gtkmountoperation-x11.c
gtk_use_win32_c_sources = \
gtkplug-win32.c \
gtksocket-win32.c \
gtkwin32embed.c \
gtkwin32embedwidget.c \
gtk_use_win32_c_sources = \
gtkplug-win32.c \
gtksocket-win32.c \
gtkwin32embed.c \
gtkwin32embedwidget.c \
gtkmountoperation-stub.c
gtk_use_quartz_c_sources = \
gtk_use_quartz_c_sources = \
gtksearchenginequartz.c \
gtkplug-stub.c \
gtksocket-stub.c \
gtkmountoperation-stub.c
gtk_use_stub_c_sources = \
gtkplug-stub.c \
gtksocket-stub.c \
gtk_use_stub_c_sources = \
gtkplug-stub.c \
gtksocket-stub.c \
gtkmountoperation-stub.c
gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_quartz_c_sources) $(gtk_use_stub_c_sources)
if USE_X11
gtk_private_h_sources += gtkxembed.h gtktrayicon.h xembed.h
gtk_private_h_sources += \
gtkxembed.h \
gtktrayicon.h \
xembed.h
gtk_c_sources += $(gtk_use_x11_c_sources)
else
if USE_WIN32
gtk_private_h_sources += gtkwin32embed.h gtkwin32embedwidget.h
gtk_private_h_sources += \
gtkwin32embed.h \
gtkwin32embedwidget.h
gtk_c_sources += $(gtk_use_win32_c_sources)
else
if USE_QUARTZ
gtk_private_h_sources += gtksearchenginequartz.h
gtk_private_h_sources += \
gtksearchenginequartz.h
gtk_c_sources += $(gtk_use_quartz_c_sources)
gtk_use_quartz_c_sources_CFLAGS = "-xobjective-c"
else
@ -760,11 +765,16 @@ endif
endif
if USE_QUARTZ
gtk_clipboard_dnd_c_sources = gtkclipboard-quartz.c gtkdnd-quartz.c gtkquartz.c
gtk_clipboard_dnd_c_sources = \
gtkclipboard-quartz.c \
gtkdnd-quartz.c \
gtkquartz.c
gtk_clipboard_dnd_h_sources = gtkquartz.h
gtk_clipboard_dnd_c_sources_CFLAGS = "-xobjective-c"
else
gtk_clipboard_dnd_c_sources = gtkclipboard.c gtkdnd.c
gtk_clipboard_dnd_c_sources = \
gtkclipboard.c \
gtkdnd.c
gtk_clipboard_dnd_c_sources_CFLAGS =
endif
EXTRA_DIST += gtkquartz.h
@ -803,7 +813,7 @@ gtk_extra_sources = \
paper_names.c \
paper_names_offsets.c \
gen-paper-names.c \
gtkstatusicon-quartz.c \
gtkstatusicon-quartz.c \
gtk.symbols \
gtkversion.h.in \
gtkmarshalers.list
@ -837,7 +847,7 @@ stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --header >> xgen-gmlh \
&& (cmp -s xgen-gmlh gtkmarshalers.h || cp xgen-gmlh gtkmarshalers.h) \
&& rm -f xgen-gmlh \
&& echo timestamp > $(@F)
&& echo timestamp > $(@F)
gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
(echo "#include \"gtkmarshalers.h\""; \
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \

View File

@ -53,7 +53,7 @@
#include "gtkmain.h"
#include "gtkmodules.h"
#include "gtkprivate.h"
#include "gtksettings.h"
#include "gtksettingsprivate.h"
#include "gtkwindow.h"
#ifdef G_OS_WIN32

File diff suppressed because it is too large Load Diff

View File

@ -38,9 +38,9 @@ G_BEGIN_DECLS
/* --- typedefs --- */
typedef struct _GtkSettingsClass GtkSettingsClass;
typedef struct _GtkSettingsValue GtkSettingsValue;
typedef struct _GtkSettingsPropertyValue GtkSettingsPropertyValue; /* Internal */
typedef struct _GtkSettingsPrivate GtkSettingsPrivate;
typedef struct _GtkSettingsClass GtkSettingsClass;
typedef struct _GtkSettingsValue GtkSettingsValue;
/* --- structures --- */
@ -48,16 +48,19 @@ struct _GtkSettings
{
GObject parent_instance;
GData *GSEAL (queued_settings); /* of type GtkSettingsValue* */
GtkSettingsPropertyValue *GSEAL (property_values);
GtkRcContext *GSEAL (rc_context);
GdkScreen *GSEAL (screen);
/*< private >*/
GtkSettingsPrivate *priv;
};
struct _GtkSettingsClass
{
GObjectClass parent_class;
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
};
struct _GtkSettingsValue
@ -75,65 +78,48 @@ struct _GtkSettingsValue
/* --- functions --- */
GType gtk_settings_get_type (void) G_GNUC_CONST;
GType gtk_settings_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
GtkSettings* gtk_settings_get_default (void);
GtkSettings* gtk_settings_get_default (void);
#endif
GtkSettings* gtk_settings_get_for_screen (GdkScreen *screen);
GtkSettings* gtk_settings_get_for_screen (GdkScreen *screen);
void gtk_settings_install_property (GParamSpec *pspec);
void gtk_settings_install_property_parser (GParamSpec *pspec,
GtkRcPropertyParser parser);
void gtk_settings_install_property (GParamSpec *pspec);
void gtk_settings_install_property_parser (GParamSpec *pspec,
GtkRcPropertyParser parser);
/* --- precoded parsing functions --- */
gboolean gtk_rc_property_parse_color (const GParamSpec *pspec,
const GString *gstring,
GValue *property_value);
const GString *gstring,
GValue *property_value);
gboolean gtk_rc_property_parse_enum (const GParamSpec *pspec,
const GString *gstring,
GValue *property_value);
const GString *gstring,
GValue *property_value);
gboolean gtk_rc_property_parse_flags (const GParamSpec *pspec,
const GString *gstring,
GValue *property_value);
const GString *gstring,
GValue *property_value);
gboolean gtk_rc_property_parse_requisition (const GParamSpec *pspec,
const GString *gstring,
GValue *property_value);
const GString *gstring,
GValue *property_value);
gboolean gtk_rc_property_parse_border (const GParamSpec *pspec,
const GString *gstring,
GValue *property_value);
const GString *gstring,
GValue *property_value);
/*< private >*/
void gtk_settings_set_property_value (GtkSettings *settings,
const gchar *name,
const GtkSettingsValue *svalue);
void gtk_settings_set_string_property (GtkSettings *settings,
const gchar *name,
const gchar *v_string,
const gchar *origin);
void gtk_settings_set_long_property (GtkSettings *settings,
const gchar *name,
glong v_long,
const gchar *origin);
void gtk_settings_set_double_property (GtkSettings *settings,
const gchar *name,
gdouble v_double,
const gchar *origin);
/* implementation details */
void _gtk_settings_set_property_value_from_rc (GtkSettings *settings,
const gchar *name,
const GtkSettingsValue *svalue);
void _gtk_settings_reset_rc_values (GtkSettings *settings);
void _gtk_settings_handle_event (GdkEventSetting *event);
GtkRcPropertyParser _gtk_rc_property_parser_from_type (GType type);
gboolean _gtk_settings_parse_convert (GtkRcPropertyParser parser,
const GValue *src_value,
GParamSpec *pspec,
GValue *dest_value);
GdkScreen *_gtk_settings_get_screen (GtkSettings *settings);
void gtk_settings_set_property_value (GtkSettings *settings,
const gchar *name,
const GtkSettingsValue *svalue);
void gtk_settings_set_string_property (GtkSettings *settings,
const gchar *name,
const gchar *v_string,
const gchar *origin);
void gtk_settings_set_long_property (GtkSettings *settings,
const gchar *name,
glong v_long,
const gchar *origin);
void gtk_settings_set_double_property (GtkSettings *settings,
const gchar *name,
gdouble v_double,
const gchar *origin);
G_END_DECLS

43
gtk/gtksettingsprivate.h Normal file
View File

@ -0,0 +1,43 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __GTK_SETTINGS_PRIVATE_H__
#define __GTK_SETTINGS_PRIVATE_H__
#include <gtk/gtksettings.h>
G_BEGIN_DECLS
void _gtk_settings_set_property_value_from_rc (GtkSettings *settings,
const gchar *name,
const GtkSettingsValue *svalue);
void _gtk_settings_reset_rc_values (GtkSettings *settings);
void _gtk_settings_handle_event (GdkEventSetting *event);
GtkRcPropertyParser _gtk_rc_property_parser_from_type (GType type);
gboolean _gtk_settings_parse_convert (GtkRcPropertyParser parser,
const GValue *src_value,
GParamSpec *pspec,
GValue *dest_value);
GdkScreen *_gtk_settings_get_screen (GtkSettings *settings);
G_END_DECLS
#endif /* __GTK_SETTINGS_PRIVATE_H__ */

View File

@ -37,7 +37,7 @@
#include "gtkmarshalers.h"
#include "gtkrc.h"
#include "gtkselection.h"
#include "gtksettings.h"
#include "gtksettingsprivate.h"
#include "gtksizegroup-private.h"
#include "gtkwidget.h"
#include "gtkwidgetprivate.h"