1/*
2 * Copyright (c) 2008-2009 Christian Hammond
3 * Copyright (c) 2008-2009 David Trowbridge
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE.
22 */
23#include <glib.h>
24
25#include "init.h"
26
27#include "a11y.h"
28#include "actions.h"
29#include "cellrenderergraph.h"
30#include "clipboard.h"
31#include "controllers.h"
32#include "css-editor.h"
33#include "css-node-tree.h"
34#include "general.h"
35#include "graphdata.h"
36#include "list-data.h"
37#include "logs.h"
38#include "magnifier.h"
39#include "measuregraph.h"
40#include "menu.h"
41#include "misc-info.h"
42#include "object-tree.h"
43#include "prop-list.h"
44#include "recorder.h"
45#include "resource-list.h"
46#include "shortcuts.h"
47#include "size-groups.h"
48#include "statistics.h"
49#include "tree-data.h"
50#include "visual.h"
51#include "window.h"
52
53#include "gtkmagnifierprivate.h"
54#include "gtkcssproviderprivate.h"
55
56#include "gtkmodulesprivate.h"
57
58static GIOExtensionPoint *extension_point = NULL;
59
60void
61gtk_inspector_init (void)
62{
63 GIOModuleScope *scope;
64 char **paths;
65 int i;
66
67 g_type_ensure (G_TYPE_LIST_STORE);
68
69 g_type_ensure (GTK_TYPE_CELL_RENDERER_GRAPH);
70 g_type_ensure (GTK_TYPE_GRAPH_DATA);
71 g_type_ensure (GTK_TYPE_INSPECTOR_A11Y);
72 g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
73 g_type_ensure (GTK_TYPE_INSPECTOR_CLIPBOARD);
74 g_type_ensure (GTK_TYPE_INSPECTOR_CONTROLLERS);
75 g_type_ensure (GTK_TYPE_INSPECTOR_CSS_EDITOR);
76 g_type_ensure (GTK_TYPE_INSPECTOR_CSS_NODE_TREE);
77 g_type_ensure (GTK_TYPE_INSPECTOR_GENERAL);
78 g_type_ensure (GTK_TYPE_INSPECTOR_LIST_DATA);
79 g_type_ensure (GTK_TYPE_INSPECTOR_LOGS);
80 g_type_ensure (GTK_TYPE_MAGNIFIER);
81 g_type_ensure (GTK_TYPE_INSPECTOR_MAGNIFIER);
82 g_type_ensure (GTK_TYPE_INSPECTOR_MEASURE_GRAPH);
83 g_type_ensure (GTK_TYPE_INSPECTOR_MENU);
84 g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
85 g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_TREE);
86 g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
87 g_type_ensure (GTK_TYPE_INSPECTOR_RECORDER);
88 g_type_ensure (GTK_TYPE_INSPECTOR_RESOURCE_LIST);
89 g_type_ensure (GTK_TYPE_INSPECTOR_SHORTCUTS);
90 g_type_ensure (GTK_TYPE_INSPECTOR_SIZE_GROUPS);
91 g_type_ensure (GTK_TYPE_INSPECTOR_STATISTICS);
92 g_type_ensure (GTK_TYPE_INSPECTOR_TREE_DATA);
93 g_type_ensure (GTK_TYPE_INSPECTOR_VISUAL);
94 g_type_ensure (GTK_TYPE_INSPECTOR_WINDOW);
95
96 paths = _gtk_get_module_path (type: "inspector");
97 scope = g_io_module_scope_new (flags: G_IO_MODULE_SCOPE_BLOCK_DUPLICATES);
98
99 for (i = 0; paths[i] != NULL; i++)
100 g_io_modules_load_all_in_directory_with_scope (dirname: paths[i], scope);
101
102 g_strfreev (str_array: paths);
103 g_io_module_scope_free (scope);
104
105 gtk_css_provider_set_keep_css_sections ();
106}
107
108void
109gtk_inspector_register_extension (void)
110{
111 if (extension_point == NULL)
112 {
113 extension_point = g_io_extension_point_register (name: "gtk-inspector-page");
114 g_io_extension_point_set_required_type (extension_point, GTK_TYPE_WIDGET);
115 }
116}
117
118// vim: set et sw=2 ts=2:
119

source code of gtk/gtk/inspector/init.c