예제 #1
0
GType
gtk_tool_button_get_type (void)
{
  static GType type = 0;
  
  if (!type)
    {
      const GInterfaceInfo activatable_info =
      {
        (GInterfaceInitFunc) gtk_tool_button_activatable_interface_init,
        (GInterfaceFinalizeFunc) NULL,
        NULL
      };

      type = g_type_register_static_simple (GTK_TYPE_TOOL_ITEM,
					    I_("GtkToolButton"),
					    sizeof (GtkToolButtonClass),
					    (GClassInitFunc) gtk_tool_button_class_init,
					    sizeof (GtkToolButton),
					    (GInstanceInitFunc) gtk_tool_button_init,
					    0);

      g_type_add_interface_static (type, GTK_TYPE_ACTIVATABLE,
                                   &activatable_info);
    }
  return type;
}
예제 #2
0
GType
gst_encoding_profile_get_type (void)
{
  static volatile gsize g_define_type_id__volatile = 0;

  if (g_once_init_enter (&g_define_type_id__volatile)) {
    GType g_define_type_id = g_type_register_static_simple (G_TYPE_OBJECT,
        g_intern_static_string ("GstEncodingProfile"),
        sizeof (GstEncodingProfileClass),
        (GClassInitFunc) gst_encoding_profile_class_intern_init,
        sizeof (GstEncodingProfile),
        NULL,
        (GTypeFlags) 0);
    static GstValueTable gstvtable = {
      G_TYPE_NONE,
      (GstValueCompareFunc) NULL,
      (GstValueSerializeFunc) NULL,
      (GstValueDeserializeFunc) gst_encoding_profile_deserialize_valfunc
    };

    gstvtable.type = g_define_type_id;

    /* Register a STRING=>PROFILE GValueTransformFunc */
    g_value_register_transform_func (G_TYPE_STRING, g_define_type_id,
        string_to_profile_transform);
    /* Register gst-specific GValue functions */
    gst_value_register (&gstvtable);

    g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
  }
  return g_define_type_id__volatile;
}
예제 #3
0
GType
gtk_style_provider_get_type (void)
{
  static GType style_provider_type = 0;

  if (!style_provider_type)
    style_provider_type = g_type_register_static_simple (G_TYPE_INTERFACE,
                                                         I_("GtkStyleProvider"),
                                                         sizeof (GtkStyleProviderIface),
                                                         (GClassInitFunc) gtk_style_provider_iface_init,
                                                         0, NULL, 0);
  return style_provider_type;
}
예제 #4
0
GType
gdata_comparable_get_type (void)
{
	static GType comparable_type = 0;

	if (!comparable_type) {
		comparable_type = g_type_register_static_simple (G_TYPE_INTERFACE, "GDataComparable",
		                                                 sizeof (GDataComparableIface),
		                                                 NULL, 0, NULL, 0);
	}

	return comparable_type;
}
예제 #5
0
GType
clutter_animatable_get_type (void)
{
  static GType a_type = 0;

  if (G_UNLIKELY (a_type == 0))
    a_type = g_type_register_static_simple (G_TYPE_INTERFACE,
                                            I_("ClutterAnimatable"),
                                            sizeof (ClutterAnimatableIface),
                                            NULL, 0, NULL, 0);

  return a_type;
}
GType
clutter_scriptable_get_type (void)
{
  static GType scriptable_type = 0;

  if (!scriptable_type)
    scriptable_type =
      g_type_register_static_simple (G_TYPE_INTERFACE, "ClutterScriptable",
                                     sizeof (ClutterScriptableIface),
                                     NULL, 0, NULL, 0);

  return scriptable_type;
}
예제 #7
0
static GType
gst_interleave_pad_get_type (void)
{
  static GType type = 0;

  if (G_UNLIKELY (type == 0)) {
    type = g_type_register_static_simple (GST_TYPE_PAD,
        g_intern_static_string ("GstInterleavePad"), sizeof (GstPadClass),
        (GClassInitFunc) gst_interleave_pad_class_init,
        sizeof (GstInterleavePad), NULL, 0);
  }
  return type;
}
예제 #8
0
GType
gdata_access_handler_get_type (void)
{
	static GType access_handler_type = 0;

	if (!access_handler_type) {
		access_handler_type = g_type_register_static_simple (G_TYPE_INTERFACE, "GDataAccessHandler",
								     sizeof (GDataAccessHandlerIface),
								     NULL, 0, NULL, 0);
		g_type_interface_add_prerequisite (access_handler_type, GDATA_TYPE_ENTRY);
	}

	return access_handler_type;
}
예제 #9
0
GType
gtk_layoutable_get_type (void)
{
  static GType layoutable_type = 0;

  if (!layoutable_type)
    {
      layoutable_type =
        g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkLayoutable"),
				       sizeof (GtkLayoutableIface),
				       NULL, 0, NULL, 0);
    }

  return layoutable_type;
}
예제 #10
0
파일: ibusmessage.c 프로젝트: definite/ibus
GType
ibus_type_get_variant (void)
{
    static GType type = 0;

    if (type == 0) {
        type = g_type_register_static_simple (G_TYPE_BOXED,
                                              "IBusVariant",
                                              0,
                                              NULL,
                                              0,
                                              NULL,
                                              0);
    }
    return type;
}
예제 #11
0
파일: gdkwindowimpl.c 프로젝트: Aridna/gtk2
GType
gdk_window_impl_get_type (void)
{
  static GType gtype = 0;

  if (G_UNLIKELY (!gtype))
    {
      gtype = g_type_register_static_simple (G_TYPE_INTERFACE,
                                             "GdkWindowImpl",
                                             sizeof (GdkWindowImplIface),
                                             NULL, 0, NULL, 0);
      g_type_interface_add_prerequisite (gtype, G_TYPE_OBJECT);
    }

  return gtype;
}
예제 #12
0
GType
ca_module_get_type()
{
    static GType type = 0;
    if (type == 0)
        type = g_type_register_static_simple(
                G_TYPE_OBJECT, /* parent_type */
                "CAModuleType", /* type_name */
                sizeof(CAModuleClass), /* class_size */
                (GClassInitFunc)class_init, /* class_init */
                sizeof(CAModule), /* instance_size */
                (GInstanceInitFunc)NULL, /* instance_init */
                0 /* flags */
            );
    return type;
}
예제 #13
0
GType
vnc_framebuffer_get_type (void)
{
	static GType framebuffer_type = 0;

	if (!framebuffer_type) {
		framebuffer_type =
			g_type_register_static_simple (G_TYPE_INTERFACE, "VncFramebuffer",
						       sizeof (VncFramebufferInterface),
						       NULL, 0, NULL, 0);

		g_type_interface_add_prerequisite (framebuffer_type, G_TYPE_OBJECT);
	}

	return framebuffer_type;
}
예제 #14
0
GType cvImageWidget_get_type (void){
  static GType image_type = 0;

  if (!image_type)
    {
      image_type = g_type_register_static_simple( GTK_TYPE_WIDGET,
                           (gchar*) "CvImageWidget",
                           sizeof(CvImageWidgetClass),
                           (GClassInitFunc) cvImageWidget_class_init,
                           sizeof(CvImageWidget),
                           (GInstanceInitFunc) cvImageWidget_init,
                           (GTypeFlags)NULL);
    }

  return image_type;
}
예제 #15
0
파일: ibusmessage.c 프로젝트: definite/ibus
GType
ibus_type_get_dict_entry (void)
{
    static GType type = 0;

    if (type == 0) {
        type = g_type_register_static_simple (
                        G_TYPE_BOXED,
                        "IBusDictEntry",
                        0,
                        NULL,
                        0,
                        NULL,
                        G_TYPE_FLAG_ABSTRACT);
    }
    return type;
}
예제 #16
0
파일: ibusmessage.c 프로젝트: definite/ibus
GType
ibus_type_get_struct (void)
{
    static GType type = 0;

    if (type == 0) {
        type = g_type_register_static_simple (
                        G_TYPE_BOXED,
                        "IBusStruct",
                        0,
                        NULL,
                        0,
                        NULL,
                        G_TYPE_FLAG_ABSTRACT);
    }
    return type;
}
예제 #17
0
파일: ibusmessage.c 프로젝트: definite/ibus
GType
ibus_type_get_object_path (void)
{
    static GType type = 0;

    if (type == 0) {
        type = g_type_register_static_simple (
                        G_TYPE_STRING,
                        "IBusObjectPath",
                        0,
                        NULL,
                        0,
                        NULL,
                        G_TYPE_FLAG_ABSTRACT);
    }
    return type;
}
예제 #18
0
/* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
 * method to get to the padtemplates */
GType
gst_segment_clip_get_type (void)
{
  static volatile gsize segment_clip_type = 0;

  if (g_once_init_enter (&segment_clip_type)) {
    GType _type;

    _type = g_type_register_static_simple (GST_TYPE_ELEMENT,
        "GstSegmentClip", sizeof (GstSegmentClipClass),
        (GClassInitFunc) gst_segment_clip_class_init, sizeof (GstSegmentClip),
        (GInstanceInitFunc) gst_segment_clip_init, G_TYPE_FLAG_ABSTRACT);

    g_once_init_leave (&segment_clip_type, _type);
  }
  return segment_clip_type;
}
GType
mdm_session_get_type (void)
{
        static GType session_type = 0;

        if (!session_type) {
                session_type = g_type_register_static_simple (G_TYPE_INTERFACE,
                                                              "MdmSession",
                                                              sizeof (MdmSessionIface),
                                                              (GClassInitFunc) mdm_session_class_init,
                                                              0, NULL, 0);

                g_type_interface_add_prerequisite (session_type, G_TYPE_OBJECT);
        }

        return session_type;
}
예제 #20
0
/* Declare the interface type, registering it as a simply static type. Then, add
 * the interface's prerequisite type as GTK_TYPE_WIDGET. */
GType
my_iface_get_type ()
{
  static GType type = 0;

  if (!type)
  {
    type = g_type_register_static_simple (G_TYPE_INTERFACE, "MyIFace",
                                          sizeof (MyIFaceInterface),
                                          (GClassInitFunc) my_iface_class_init,
                                          0, NULL, 0);

    g_type_interface_add_prerequisite (type, GTK_TYPE_WIDGET);
  }

  return type;
}
GType
gdm_login_extension_get_type (void)
{
    static GType login_extension_type = 0;

    if (!login_extension_type) {
        login_extension_type = g_type_register_static_simple (G_TYPE_INTERFACE,
                               "GdmLoginExtension",
                               sizeof (GdmLoginExtensionIface),
                               (GClassInitFunc) gdm_login_extension_class_init,
                               0, NULL, 0);

        g_type_interface_add_prerequisite (login_extension_type, G_TYPE_OBJECT);
    }

    return login_extension_type;
}
예제 #22
0
파일: testobj.c 프로젝트: liuqun/hellodbus
GType test_obj_get_type (void)
{
	static volatile gsize g_define_type_id__volatile = 0;
	if (g_once_init_enter (&g_define_type_id__volatile))
	{
		GType g_define_type_id = g_type_register_static_simple (
			G_TYPE_OBJECT,
			g_intern_static_string ("TestObj"),
			sizeof (TestObjClass),
			(GClassInitFunc) test_obj_class_intern_init,
			sizeof (TestObj),
			(GInstanceInitFunc) test_obj_init,
			(GTypeFlags) 0);
		g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
	}
	return g_define_type_id__volatile;
}
예제 #23
0
/* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
 * method to get to the padtemplates */
GType
gst_raw_parse_get_type (void)
{
  static volatile gsize raw_parse_type = 0;

  if (g_once_init_enter (&raw_parse_type)) {
    GType _type;

    _type = g_type_register_static_simple (GST_TYPE_ELEMENT,
        "GstRawParse", sizeof (GstRawParseClass),
        (GClassInitFunc) gst_raw_parse_class_init, sizeof (GstRawParse),
        (GInstanceInitFunc) gst_raw_parse_init, G_TYPE_FLAG_ABSTRACT);

    g_once_init_leave (&raw_parse_type, _type);
  }
  return raw_parse_type;
}
예제 #24
0
GType
giggle_history_get_type (void)
{
	static GType type = 0;

	if (G_UNLIKELY (!type)) {
		type = g_type_register_static_simple
			(G_TYPE_INTERFACE, "GiggleHistoryIface",
			 sizeof (GiggleHistoryIface),
			 giggle_history_iface_init, 0,
			 NULL, 0);

		g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
	}

	return type;
}
예제 #25
0
GType
gum_script_backend_get_type (void)
{
  static volatile gsize gonce_value;

  if (g_once_init_enter (&gonce_value))
  {
    GType gtype;

    gtype = g_type_register_static_simple (G_TYPE_INTERFACE, "GumScriptBackend",
        sizeof (GumScriptBackendIface), NULL, 0, NULL, 0);
    g_type_interface_add_prerequisite (gtype, G_TYPE_OBJECT);

    g_once_init_leave (&gonce_value, gtype);
  }

  return (GType) gonce_value;
}
예제 #26
0
GType basedecoder_get_type (void)
{
    static volatile gsize gonce_data = 0;
// INLINE - g_once_init_enter()
    if (g_once_init_enter (&gonce_data))
    {
        GType _type;
        _type = g_type_register_static_simple (TYPE_AVELEMENT,
               g_intern_static_string ("BaseDecoder"),
               sizeof (BaseDecoderClass),
               (GClassInitFunc) basedecoder_class_intern_init,
               sizeof(BaseDecoder),
               (GInstanceInitFunc) basedecoder_init,
               (GTypeFlags) 0);
        g_once_init_leave (&gonce_data, (gsize) _type);
    }
    return (GType) gonce_data;
}
예제 #27
0
파일: gtkplotps.c 프로젝트: GNOME/genius
GType
gtk_plot_ps_get_type (void)
{
  static GType pc_type = 0;

  if (!pc_type)
    {
      pc_type = g_type_register_static_simple (
		GTK_TYPE_PLOT_PC,
		"GtkPlotPS",
		sizeof (GtkPlotPSClass),
		(GClassInitFunc) gtk_plot_ps_class_init,
		sizeof (GtkPlotPS),
		(GInstanceInitFunc) gtk_plot_ps_init,
		0);
    }
  return pc_type;
}
예제 #28
0
GType progress_buffer_get_type (void)
{
    static volatile gsize gonce_data = 0;
// INLINE - g_once_init_enter()
    if (g_once_init_enter (&gonce_data))
    {
        GType _type;
        _type = g_type_register_static_simple (GST_TYPE_ELEMENT,
               g_intern_static_string ("ProgressBuffer"),
               sizeof (ProgressBufferClass),
               (GClassInitFunc) progress_buffer_class_intern_init,
               sizeof(ProgressBuffer),
               (GInstanceInitFunc) progress_buffer_init,
               (GTypeFlags) 0);
        g_once_init_leave (&gonce_data, (gsize) _type);
    }
    return (GType) gonce_data;
}
GType
hd_notification_plugin_get_type (void)
{
  static GType notification_plugin_type = 0;

  if (!notification_plugin_type)
    {
      notification_plugin_type = g_type_register_static_simple (G_TYPE_INTERFACE,
                                                                "HDNotificationPlugin",
                                                                sizeof (HDNotificationPluginIface),
                                                                (GClassInitFunc) hd_notification_plugin_class_init,
                                                                0, NULL, 0);

      g_type_interface_add_prerequisite (notification_plugin_type, G_TYPE_OBJECT);
    }

  return notification_plugin_type;
}
예제 #30
0
GType
gtk_plot_polar_get_type (void)
{
  static GType plot_type = 0;

  if (!plot_type)
    {
      plot_type = g_type_register_static_simple (
		gtk_plot_get_type(),
		"GtkPlotPolar",
		sizeof (GtkPlotPolarClass),
		(GClassInitFunc) gtk_plot_polar_class_init,
		sizeof (GtkPlotPolar),
		(GInstanceInitFunc) gtk_plot_polar_init,
		0);
    }
  return plot_type;
}