Ejemplo n.º 1
0
void
photos_utils_ensure_extension_points (void)
{
  static gsize once_init_value = 0;

  if (g_once_init_enter (&once_init_value))
    {
      GIOExtensionPoint *extension_point;

      extension_point = g_io_extension_point_register (PHOTOS_BASE_ITEM_EXTENSION_POINT_NAME);
      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_BASE_ITEM);

      extension_point = g_io_extension_point_register (PHOTOS_SHARE_POINT_EXTENSION_POINT_NAME);
      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_SHARE_POINT);

      extension_point = g_io_extension_point_register (PHOTOS_SHARE_POINT_ONLINE_EXTENSION_POINT_NAME);
      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_SHARE_POINT_ONLINE);

      extension_point = g_io_extension_point_register (PHOTOS_TOOL_EXTENSION_POINT_NAME);
      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_TOOL);

      extension_point = g_io_extension_point_register (PHOTOS_TRACKER_CONTROLLER_EXTENSION_POINT_NAME);
      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_TRACKER_CONTROLLER);

      g_once_init_leave (&once_init_value, 1);
    }
}
Ejemplo n.º 2
0
void
gtk_inspector_init (void)
{
  static GIOExtensionPoint *extension_point = NULL;

  g_type_ensure (G_TYPE_LIST_STORE);

  g_type_ensure (GTK_TYPE_CELL_RENDERER_GRAPH);
  g_type_ensure (GTK_TYPE_GRAPH_DATA);
  g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
  g_type_ensure (GTK_TYPE_INSPECTOR_CSS_EDITOR);
  g_type_ensure (GTK_TYPE_INSPECTOR_CSS_NODE_TREE);
  g_type_ensure (GTK_TYPE_INSPECTOR_DATA_LIST);
  g_type_ensure (GTK_TYPE_INSPECTOR_GENERAL);
  g_type_ensure (GTK_TYPE_INSPECTOR_GESTURES);
  g_type_ensure (GTK_TYPE_MAGNIFIER);
  g_type_ensure (GTK_TYPE_INSPECTOR_MAGNIFIER);
  g_type_ensure (GTK_TYPE_INSPECTOR_MENU);
  g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
  g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY);
  g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_TREE);
  g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
  g_type_ensure (GTK_TYPE_INSPECTOR_RECORDER);
  g_type_ensure (GTK_TYPE_INSPECTOR_RESOURCE_LIST);
  g_type_ensure (GTK_TYPE_INSPECTOR_SELECTOR);
  g_type_ensure (GTK_TYPE_INSPECTOR_SIGNALS_LIST);
  g_type_ensure (GTK_TYPE_INSPECTOR_SIZE_GROUPS);
  g_type_ensure (GTK_TYPE_INSPECTOR_STATISTICS);
  g_type_ensure (GTK_TYPE_INSPECTOR_VISUAL);
  g_type_ensure (GTK_TYPE_INSPECTOR_WINDOW);
  g_type_ensure (GTK_TYPE_RENDER_NODE_VIEW);
  g_type_ensure (GTK_TYPE_STACK_COMBO);

  if (extension_point == NULL)
    {
      GIOModuleScope *scope;
      gchar **paths;
      int i;

      extension_point = g_io_extension_point_register ("gtk-inspector-page");
      g_io_extension_point_set_required_type (extension_point, GTK_TYPE_WIDGET);

      paths = _gtk_get_module_path ("inspector");
      scope = g_io_module_scope_new (G_IO_MODULE_SCOPE_BLOCK_DUPLICATES);

      for (i = 0; paths[i] != NULL; i++)
        g_io_modules_load_all_in_directory_with_scope (paths[i], scope);

      g_strfreev (paths);
      g_io_module_scope_free (scope);
    }
}
Ejemplo n.º 3
0
static void
panel_modules_ensure_extension_points_registered (void)
{
	static gboolean registered_extensions = FALSE;
	GIOExtensionPoint *ep;

	if (!registered_extensions) {
		registered_extensions = TRUE;

		ep = g_io_extension_point_register (PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME);
		g_io_extension_point_set_required_type (ep, PANEL_TYPE_APPLETS_MANAGER);
	}
 }