Chromium Code Reviews| Index: build/linux/gsettings.h |
| diff --git a/build/linux/gsettings.h b/build/linux/gsettings.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3a33465a48806d9b009510a312e0abd1647ccfb |
| --- /dev/null |
| +++ b/build/linux/gsettings.h |
| @@ -0,0 +1,24 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BUILD_LINUX_GSETTINGS_H_ |
| +#define BUILD_LINUX_GSETTINGS_H_ |
| + |
| +#include <gio/gio.h> |
| + |
| +// We replicate the prototypes for the g_settings APIs we need. We may not |
| +// even be compiling on a system that has them. |
| +// TODO(phajdan.jr): This will no longer be needed after switch to Precise, |
| +// see http://crbug.com/158577 . |
|
Ryan Sleevi
2012/11/29 21:51:04
nit: Can you rewrite this comment to provide clear
Paweł Hajdan Jr.
2012/11/29 22:29:00
Done.
|
| +struct _GSettings; |
| +typedef struct _GSettings GSettings; |
|
Ryan Sleevi
2012/11/29 21:51:04
I don't think this will work.
In the original cod
Paweł Hajdan Jr.
2012/11/29 22:29:00
Green trybot compiles contradict your comment. It
Ryan Sleevi
2012/11/29 23:02:58
C forbids this. C++ allows this. You're getting lu
|
| +GSettings* g_settings_new(const gchar* schema); |
| +GSettings* g_settings_get_child(GSettings* settings, const gchar* name); |
| +gboolean g_settings_get_boolean(GSettings* settings, const gchar* key); |
| +gchar* g_settings_get_string(GSettings* settings, const gchar* key); |
| +gint g_settings_get_int(GSettings* settings, const gchar* key); |
| +gchar** g_settings_get_strv(GSettings* settings, const gchar* key); |
| +const gchar* const* g_settings_list_schemas(); |
|
Ryan Sleevi
2012/11/29 21:51:04
In the existing code, these forward declarations w
Paweł Hajdan Jr.
2012/11/29 22:29:00
Nope, when linking directly system header will be
|
| + |
| +#endif // BUILD_LINUX_GSETTINGS_H_ |