示例#1
0
void
cc_wacom_panel_register (GIOModule *module)
{
	cc_wacom_panel_register_type (G_TYPE_MODULE (module));
	g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
					CC_TYPE_WACOM_PANEL, "wacom", 0);
}
示例#2
0
void
um_user_panel_register (GIOModule *module)
{
        um_user_panel_register_type (G_TYPE_MODULE (module));
        g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                        UM_TYPE_USER_PANEL, "user-accounts", 0);
}
void
cc_background_panel_register (GIOModule *module)
{
  cc_background_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  CC_TYPE_BACKGROUND_PANEL,
                                  "background", 0);
}
void
g_io_module_load (GIOModule *module)
{
        g_io_extension_point_implement (GDM_LOGIN_EXTENSION_POINT_NAME,
                                        GDM_TYPE_PASSWORD_EXTENSION,
                                        GDM_PASSWORD_EXTENSION_NAME,
                                        G_MAXINT);
}
void
g_io_module_load (GIOModule *module)
{
        g_io_extension_point_implement (GDM_LOGIN_EXTENSION_POINT_NAME,
                                        GDM_TYPE_SMARTCARD_EXTENSION,
                                        GDM_SMARTCARD_EXTENSION_NAME,
                                        0);
}
void
cc_mouse_panel_register (GIOModule *module)
{
    cc_mouse_panel_register_type (G_TYPE_MODULE (module));
    g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                    CC_TYPE_MOUSE_PANEL,
                                    "mouse", 0);
}
void
cc_screen_panel_register (GIOModule *module)
{
  cc_screen_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  CC_TYPE_SCREEN_PANEL,
                                  "screen", 0);
}
void
cc_ua_panel_register (GIOModule *module)
{
  cc_ua_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  CC_TYPE_UA_PANEL,
                                  "universal-access", 0);
}
static void
goa_panel_register (GIOModule *module)
{
  goa_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  GOA_TYPE_PANEL,
                                  "online-accounts",
                                  0);
}
void
g_libproxy_resolver_register (GIOModule *module)
{
  g_libproxy_resolver_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (G_PROXY_RESOLVER_EXTENSION_POINT_NAME,
				  g_libproxy_resolver_get_type(),
				  "libproxy",
				  0);
}
void
cc_date_time_panel_register (GIOModule *module)
{
  bind_textdomain_codeset (GETTEXT_PACKAGE_TIMEZONES, "UTF-8");

  cc_date_time_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  CC_TYPE_DATE_TIME_PANEL,
                                  "datetime", 0);
}
void
g_io_module_load (GIOModule *module)
{
  DEBUG ("FakeNetworkMonitor plugin");

  fake_network_monitor_register_type (G_TYPE_MODULE (module));

  g_io_extension_point_implement (G_NETWORK_MONITOR_EXTENSION_POINT_NAME,
      fake_network_monitor_get_type (), "fake", G_MAXINT);
}
void
cc_ua_panel_register (GIOModule *module)
{
  bindtextdomain (GETTEXT_PACKAGE, "/usr/share/cinnamon/locale");
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  cc_ua_panel_register_type (G_TYPE_MODULE (module));
  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  CC_TYPE_UA_PANEL,
                                  "universal-access", 0);
}
void
cc_region_panel_register (GIOModule * module)
{
    bindtextdomain (GETTEXT_PACKAGE, "/usr/share/sagarmatha/locale");
    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	cc_region_panel_register_type (G_TYPE_MODULE (module));
	g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
					CC_TYPE_REGION_PANEL,
					"region", 0);
}
/**
 * g_io_module_load:
 **/
void
g_io_module_load (GIOModule *module)
{
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");

	pk_action_lookup_register_type (G_TYPE_MODULE (module));

	g_io_extension_point_implement (POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME,
					PK_TYPE_ACTION_LOOKUP,
					"PackageKit action lookup extension " PACKAGE_VERSION,
					0);
}
示例#16
0
文件: fm-udisks.c 项目: engla/libfm
gboolean _fm_udisks_init()
{
    /* glib < 2.23.2 has errors if an extension poinbt is already registered */
#if !GLIB_CHECK_VERSION(2, 23, 2)
    if(!g_io_extension_point_lookup(G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME))
#endif
    {
        g_io_extension_point_register(G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME);
    }

    /* register our own volume monitor to override the one provided in gvfs. */
    g_io_extension_point_implement(G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME,
        G_UDISKS_VOLUME_MONITOR_TYPE,
        "udisks-monitor", 2 /* the gdu monitor provided by gvfs uses priority 3 */
    );
}
示例#17
0
void
drw_cc_panel_register_type (GTypeModule *module)
{
  GType parent_type, g_define_type_id;
  GTypeQuery query;
  GTypeInfo type_info = {
    0,
    (GBaseInitFunc) NULL,
    (GBaseFinalizeFunc) NULL,
    (GClassInitFunc) drw_cc_panel_class_init,
    (GClassFinalizeFunc) drw_cc_panel_class_finalize,
    NULL,
    0,
    0,
    (GInstanceInitFunc) drw_cc_panel_init,
    NULL
  };

  parent_type = g_type_from_name ("CcPanel");
  if (parent_type == 0 || !g_type_is_a (parent_type, GTK_TYPE_WIDGET)) {
    drw_cc_panel_type = G_TYPE_INVALID;
    return;
  }

  g_type_query (parent_type, &query);
  type_info.class_size = query.class_size;
  type_info.instance_size = query.instance_size;

  g_define_type_id =
    drw_cc_panel_type =
      g_type_module_register_type (module,
                                   parent_type,
                                   "DrwCcPanel",
                                   &type_info,
                                   0);

  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
                                  g_define_type_id,
                                  "typing-break", 0);
}
示例#18
0
  GList *volumes;
  GList *mounts;
};

static void mountpoints_changed      (GUnixMountMonitor  *mount_monitor,
                                      gpointer            user_data);
static void mounts_changed           (GUnixMountMonitor  *mount_monitor,
                                      gpointer            user_data);
static void update_volumes           (GUnixVolumeMonitor *monitor);
static void update_mounts            (GUnixVolumeMonitor *monitor);

#define g_unix_volume_monitor_get_type _g_unix_volume_monitor_get_type
G_DEFINE_TYPE_WITH_CODE (GUnixVolumeMonitor, g_unix_volume_monitor, G_TYPE_NATIVE_VOLUME_MONITOR,
                         g_io_extension_point_implement (G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME,
							 g_define_type_id,
							 "unix",
							 0));

static void
g_unix_volume_monitor_finalize (GObject *object)
{
  GUnixVolumeMonitor *monitor;
  
  monitor = G_UNIX_VOLUME_MONITOR (object);

  g_signal_handlers_disconnect_by_func (monitor->mount_monitor, mountpoints_changed, monitor);
  g_signal_handlers_disconnect_by_func (monitor->mount_monitor, mounts_changed, monitor);
					
  g_object_unref (monitor->mount_monitor);

  g_list_foreach (monitor->last_mountpoints, (GFunc)g_unix_mount_point_free, NULL);
示例#19
0
static void
ide_init_ctor (void)
{
  GgitFeatureFlags ggit_flags;

  g_irepository_prepend_search_path (LIBDIR"/gnome-builder/girepository-1.0");

  g_type_ensure (IDE_TYPE_CONTEXT);
  g_type_ensure (IDE_TYPE_VCS);

  g_io_extension_point_register (IDE_FILE_SETTINGS_EXTENSION_POINT);
  g_io_extension_point_register (IDE_SCRIPT_EXTENSION_POINT);
  g_io_extension_point_register (IDE_VCS_EXTENSION_POINT);

  g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
                                  IDE_TYPE_MODELINES_FILE_SETTINGS,
                                  IDE_FILE_SETTINGS_EXTENSION_POINT".modelines",
                                  -100);
  g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
                                  IDE_TYPE_EDITORCONFIG_FILE_SETTINGS,
                                  IDE_FILE_SETTINGS_EXTENSION_POINT".editorconfig",
                                  -200);
  g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
                                  IDE_TYPE_GSETTINGS_FILE_SETTINGS,
                                  IDE_FILE_SETTINGS_EXTENSION_POINT".gsettings",
                                  -300);

#ifdef ENABLE_GJS_SCRIPTING
  g_io_extension_point_implement (IDE_SCRIPT_EXTENSION_POINT,
                                  IDE_TYPE_GJS_SCRIPT,
                                  IDE_SCRIPT_EXTENSION_POINT".gjs",
                                  -100);
#endif

#ifdef ENABLE_PYTHON_SCRIPTING
  g_io_extension_point_implement (IDE_SCRIPT_EXTENSION_POINT,
                                  IDE_TYPE_PYGOBJECT_SCRIPT,
                                  IDE_SCRIPT_EXTENSION_POINT".py",
                                  -100);
#endif

  g_io_extension_point_implement (IDE_VCS_EXTENSION_POINT,
                                  IDE_TYPE_GIT_VCS,
                                  IDE_VCS_EXTENSION_POINT".git",
                                  -100);
  g_io_extension_point_implement (IDE_VCS_EXTENSION_POINT,
                                  IDE_TYPE_DIRECTORY_VCS,
                                  IDE_VCS_EXTENSION_POINT".directory",
                                  -200);

  modeline_parser_init ();

  ggit_init ();

  ggit_flags = ggit_get_features ();

  if ((ggit_flags & GGIT_FEATURE_THREADS) == 0)
    {
      g_error (_("Builder requires libgit2-glib with threading support."));
      exit (EXIT_FAILURE);
    }

  if ((ggit_flags & GGIT_FEATURE_SSH) == 0)
    {
      g_error (_("Builder requires libgit2-glib with SSH support."));
      exit (EXIT_FAILURE);
    }

  _ide_thread_pool_init ();

  _ide_battery_monitor_init ();
}
示例#20
0
文件: ide.c 项目: Dagal/gnome-builder
static void
ide_init_ctor (void)
{
  GgitFeatureFlags ggit_flags;

  g_type_ensure (IDE_TYPE_CONTEXT);
  g_type_ensure (IDE_TYPE_BUILD_SYSTEM);
  g_type_ensure (IDE_TYPE_VCS);

  g_io_extension_point_register (IDE_BUILD_SYSTEM_EXTENSION_POINT);
  g_io_extension_point_register (IDE_FILE_SETTINGS_EXTENSION_POINT);
  g_io_extension_point_register (IDE_LANGUAGE_EXTENSION_POINT);
  g_io_extension_point_register (IDE_PROJECT_MINER_EXTENSION_POINT);
  g_io_extension_point_register (IDE_SCRIPT_EXTENSION_POINT);
  g_io_extension_point_register (IDE_SEARCH_PROVIDER_EXTENSION_POINT);
  g_io_extension_point_register (IDE_SERVICE_EXTENSION_POINT);
  g_io_extension_point_register (IDE_VCS_EXTENSION_POINT);

  g_io_extension_point_implement (IDE_BUILD_SYSTEM_EXTENSION_POINT,
                                  IDE_TYPE_AUTOTOOLS_BUILD_SYSTEM,
                                  IDE_BUILD_SYSTEM_EXTENSION_POINT".autotools",
                                  -100);
  g_io_extension_point_implement (IDE_BUILD_SYSTEM_EXTENSION_POINT,
                                  IDE_TYPE_DIRECTORY_BUILD_SYSTEM,
                                  IDE_BUILD_SYSTEM_EXTENSION_POINT".directory",
                                  -200);

  g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
                                  IDE_TYPE_EDITORCONFIG_FILE_SETTINGS,
                                  IDE_FILE_SETTINGS_EXTENSION_POINT".editorconfig",
                                  -100);
  g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
                                  IDE_TYPE_GSETTINGS_FILE_SETTINGS,
                                  IDE_FILE_SETTINGS_EXTENSION_POINT".gsettings",
                                  -200);

  g_io_extension_point_implement (IDE_LANGUAGE_EXTENSION_POINT,
                                  IDE_TYPE_C_LANGUAGE,
                                  IDE_LANGUAGE_EXTENSION_POINT".c",
                                  0);
  g_io_extension_point_implement (IDE_LANGUAGE_EXTENSION_POINT,
                                  IDE_TYPE_HTML_LANGUAGE,
                                  IDE_LANGUAGE_EXTENSION_POINT".html",
                                  0);
  g_io_extension_point_implement (IDE_LANGUAGE_EXTENSION_POINT,
                                  IDE_TYPE_PYTHON_LANGUAGE,
                                  IDE_LANGUAGE_EXTENSION_POINT".python",
                                  0);
  g_io_extension_point_implement (IDE_LANGUAGE_EXTENSION_POINT,
                                  IDE_TYPE_XML_LANGUAGE,
                                  IDE_LANGUAGE_EXTENSION_POINT".xml",
                                  0);
  g_io_extension_point_implement (IDE_LANGUAGE_EXTENSION_POINT,
                                  IDE_TYPE_VALA_LANGUAGE,
                                  IDE_LANGUAGE_EXTENSION_POINT".vala",
                                  0);

  g_io_extension_point_implement (IDE_PROJECT_MINER_EXTENSION_POINT,
                                  IDE_TYPE_AUTOTOOLS_PROJECT_MINER,
                                  IDE_PROJECT_MINER_EXTENSION_POINT".autotools",
                                  0);

  g_io_extension_point_implement (IDE_SCRIPT_EXTENSION_POINT,
                                  IDE_TYPE_GJS_SCRIPT,
                                  IDE_SCRIPT_EXTENSION_POINT".gjs",
                                  -100);

  g_io_extension_point_implement (IDE_SCRIPT_EXTENSION_POINT,
                                  IDE_TYPE_PYGOBJECT_SCRIPT,
                                  IDE_SCRIPT_EXTENSION_POINT".py",
                                  -100);

  g_io_extension_point_implement (IDE_SEARCH_PROVIDER_EXTENSION_POINT,
                                  IDE_TYPE_DEVHELP_SEARCH_PROVIDER,
                                  IDE_SEARCH_PROVIDER_EXTENSION_POINT".devhelp",
                                  -100);

  g_io_extension_point_implement (IDE_SEARCH_PROVIDER_EXTENSION_POINT,
                                  IDE_TYPE_GIT_SEARCH_PROVIDER,
                                  IDE_SEARCH_PROVIDER_EXTENSION_POINT".git",
                                  -100);

  g_io_extension_point_implement (IDE_SERVICE_EXTENSION_POINT,
                                  IDE_TYPE_CLANG_SERVICE,
                                  IDE_SERVICE_EXTENSION_POINT".clang",
                                  -100);
  g_io_extension_point_implement (IDE_SERVICE_EXTENSION_POINT,
                                  IDE_TYPE_GCA_SERVICE,
                                  IDE_SERVICE_EXTENSION_POINT".gca",
                                  -200);

  g_io_extension_point_implement (IDE_VCS_EXTENSION_POINT,
                                  IDE_TYPE_GIT_VCS,
                                  IDE_VCS_EXTENSION_POINT".git",
                                  -100);
  g_io_extension_point_implement (IDE_VCS_EXTENSION_POINT,
                                  IDE_TYPE_DIRECTORY_VCS,
                                  IDE_VCS_EXTENSION_POINT".directory",
                                  -200);

  modeline_parser_init ();

  ggit_init ();

  ggit_flags = ggit_get_features ();

  if ((ggit_flags & GGIT_FEATURE_THREADS) == 0)
    {
      g_error (_("Builder requires libgit2-glib with threading support."));
      exit (EXIT_FAILURE);
    }

  if ((ggit_flags & GGIT_FEATURE_SSH) == 0)
    {
      g_error (_("Builder requires libgit2-glib with SSH support."));
      exit (EXIT_FAILURE);
    }
}
struct _GoaFlickrProviderClass
{
  GoaOAuthProviderClass parent_class;
};

/**
 * SECTION:goaflickrprovider
 * @title: GoaFlickrProvider
 * @short_description: A provider for Flickr
 *
 * #GoaFlickrProvider is used for handling Flickr accounts.
 */

G_DEFINE_TYPE_WITH_CODE (GoaFlickrProvider, goa_flickr_provider, GOA_TYPE_OAUTH_PROVIDER,
                         g_io_extension_point_implement (GOA_PROVIDER_EXTENSION_POINT_NAME,
							 g_define_type_id,
							 "flickr",
							 0));

/* ---------------------------------------------------------------------------------------------------- */

static const gchar *
get_provider_type (GoaProvider *_provider)
{
  return "flickr";
}

static gchar *
get_provider_name (GoaProvider *_provider,
                   GoaObject   *object)
{
  return g_strdup (_("Flickr"));
示例#22
0
 * Author: Vlad Grecescu <*****@*****.**>
 * 
 */

#define _WIN32_WINNT 0x0400

#include "config.h"
#include "gwin32directorymonitor.h"
#include "giomodule.h"
#include <windows.h>

G_DEFINE_TYPE_WITH_CODE (GWin32DirectoryMonitor,
			 g_win32_directory_monitor,
			 G_TYPE_LOCAL_DIRECTORY_MONITOR,
			 g_io_extension_point_implement (G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME,
							 g_define_type_id,
							 "readdirectorychanges",
							 20))

struct _GWin32DirectoryMonitorPrivate {
  OVERLAPPED overlapped;
  DWORD buffer_allocated_bytes;
  gchar *file_notify_buffer;
  DWORD buffer_filled_bytes;
  HANDLE hDirectory;
  /* Needed in the APC where we only have this private struct */
  GFileMonitor *self;
};

static void g_win32_directory_monitor_finalize (GObject *base);
static gboolean g_win32_directory_monitor_cancel (GFileMonitor *base);
typedef struct _GNextstepSettingsBackend GNextstepSettingsBackend;
typedef GSettingsBackendClass            GNextstepSettingsBackendClass;

struct _GNextstepSettingsBackend
{
  GSettingsBackend  parent_instance;

  /*< private >*/
  NSUserDefaults   *user_defaults;
  GMutex            mutex;
};

G_DEFINE_TYPE_WITH_CODE (GNextstepSettingsBackend,
                         g_nextstep_settings_backend,
                         G_TYPE_SETTINGS_BACKEND,
                         g_io_extension_point_implement (G_SETTINGS_BACKEND_EXTENSION_POINT_NAME,
                                                         g_define_type_id, "nextstep", 90));

static void          g_nextstep_settings_backend_finalize       (GObject            *backend);

static GVariant *    g_nextstep_settings_backend_read           (GSettingsBackend   *backend,
                                                                 const gchar        *key,
                                                                 const GVariantType *expected_type,
                                                                 gboolean            default_value);

static gboolean      g_nextstep_settings_backend_get_writable   (GSettingsBackend   *backend,
                                                                 const gchar        *key);

static gboolean      g_nextstep_settings_backend_write          (GSettingsBackend   *backend,
                                                                 const gchar        *key,
                                                                 GVariant           *value,
                                                                 gpointer            origin_tag);
#endif

#include <gio/gio.h>

#define gtk_app_chooser_online_pk_get_type _gtk_app_chooser_online_pk_get_type
static void app_chooser_online_iface_init (GtkAppChooserOnlineInterface *iface);
static void app_chooser_online_pk_async_initable_init (GAsyncInitableIface *iface);

G_DEFINE_TYPE_WITH_CODE (GtkAppChooserOnlinePk, gtk_app_chooser_online_pk,
                         G_TYPE_OBJECT,
                         G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE,
                                                app_chooser_online_pk_async_initable_init)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_APP_CHOOSER_ONLINE,
                                                app_chooser_online_iface_init)
                         g_io_extension_point_implement ("gtkappchooser-online",
                                                         g_define_type_id,
                                                         "packagekit", 10));

struct _GtkAppChooserOnlinePkPrivate {
  GSimpleAsyncResult *init_result;
  guint watch_id;

  GDBusProxy *proxy;
  GSimpleAsyncResult *result;
  GtkWindow *parent;
};

static void
gtk_app_chooser_online_pk_dispose (GObject *obj)
{
  GtkAppChooserOnlinePk *self = GTK_APP_CHOOSER_ONLINE_PK (obj);
#include <gio/gio.h>
#include <gmodule.h>
#include <string.h>

#include <panel-applets-manager.h>

#include "panel-applet-frame-dbus.h"

#include "panel-applets-manager-dbus.h"

G_DEFINE_TYPE_WITH_CODE (PanelAppletsManagerDBus,
                         panel_applets_manager_dbus,
                         PANEL_TYPE_APPLETS_MANAGER,
                         g_io_extension_point_implement (PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME,
                                 g_define_type_id,
                                 "dbus",
                                 10))

struct _PanelAppletsManagerDBusPrivate
{
    GHashTable *applet_factories;
    GList      *monitors;
};

typedef gint (* ActivateAppletFunc) (void);

typedef struct _PanelAppletFactoryInfo {
    gchar              *id;
    gchar              *location;
    gboolean            in_process;
    GModule            *module;