• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ G_IMPLEMENT_INTERFACE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中G_IMPLEMENT_INTERFACE函数的典型用法代码示例。如果您正苦于以下问题:C++ G_IMPLEMENT_INTERFACE函数的具体用法?C++ G_IMPLEMENT_INTERFACE怎么用?C++ G_IMPLEMENT_INTERFACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了G_IMPLEMENT_INTERFACE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: initable_iface_init

struct _TransliteratorIcuClass
{
  TranslitTransliteratorClass parent_class;
};

typedef struct _TransliteratorIcu TransliteratorIcu;
typedef struct _TransliteratorIcuClass TransliteratorIcuClass;

static void initable_iface_init (GInitableIface *initable_iface);

G_DEFINE_DYNAMIC_TYPE_EXTENDED (TransliteratorIcu,
				transliterator_icu,
				TRANSLIT_TYPE_TRANSLITERATOR,
				0,
				G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
						       initable_iface_init));

static gchar *
ustring_to_utf8 (const UChar *ustr, int32_t ustrLength)
{
  gchar *dest;
  int32_t destLength;
  UErrorCode errorCode;

  errorCode = 0;
  u_strToUTF8 (NULL, 0, &destLength, ustr, ustrLength, &errorCode);
  if (errorCode != U_BUFFER_OVERFLOW_ERROR)
    {
      g_warning ("can't get the number of byte required to convert ustring: %s",
		 u_errorName (errorCode));
      return NULL;
开发者ID:mike-fabian,项目名称:libtranslit,代码行数:31,代码来源:transliteratoricu.c


示例2: mx_focusable_iface_init

 *
 * #MxComboBox combines a button with a popup menu to allow the user to select
 * an option from a list.
 */

#include "mx-combo-box.h"
#include "mx-menu.h"

#include "mx-private.h"
#include "mx-stylable.h"

static void mx_focusable_iface_init (MxFocusableIface *iface);
static void mx_stylable_iface_init (MxStylableIface *iface);

G_DEFINE_TYPE_WITH_CODE (MxComboBox, mx_combo_box, MX_TYPE_WIDGET,
                         G_IMPLEMENT_INTERFACE (MX_TYPE_FOCUSABLE,
                                                mx_focusable_iface_init)
                         G_IMPLEMENT_INTERFACE (MX_TYPE_STYLABLE,
                                                mx_stylable_iface_init))

#define COMBO_BOX_PRIVATE(o) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), MX_TYPE_COMBO_BOX, MxComboBoxPrivate))

struct _MxComboBoxPrivate
{
  ClutterActor *label;
  ClutterActor *icon;
  ClutterActor *marker;
  GSList       *actions;
  gfloat        clip_x;
  gfloat        clip_y;
  gint          index;
开发者ID:GunioRobot,项目名称:mx,代码行数:32,代码来源:mx-combo-box.c


示例3: mex_content_view_iface_init

#include "mex-action-list.h"
#include "mex-action-manager.h"
#include "mex-content-view.h"
#include "mex-main.h"
#include "mex-tile.h"
#include "mex-program.h"
#include "mex-private.h"
#include "mex-utils.h"
#include "mex-queue-button.h"
#include "mex-info-panel.h"
#include "mex-content-tile.h"

static void mex_content_view_iface_init (MexContentViewIface *iface);
static void mex_content_box_focusable_iface_init (MxFocusableIface *iface);
G_DEFINE_TYPE_WITH_CODE (MexContentBox, mex_content_box, MX_TYPE_WIDGET,
                         G_IMPLEMENT_INTERFACE (MEX_TYPE_CONTENT_VIEW,
                                                mex_content_view_iface_init)
                         G_IMPLEMENT_INTERFACE (MX_TYPE_FOCUSABLE,
                                                mex_content_box_focusable_iface_init))

#define CONTENT_BOX_PRIVATE(o) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), MEX_TYPE_CONTENT_BOX, MexContentBoxPrivate))

#define DEFAULT_THUMB_WIDTH 426
#define DEFAULT_THUMB_HEIGHT 240
#define DEFAULT_THUMB_RATIO ((float)DEFAULT_THUMB_HEIGHT/(float)DEFAULT_THUMB_WIDTH)

enum
{
  PROP_0,

  PROP_OPEN,
开发者ID:Cyrene,项目名称:media-explorer,代码行数:32,代码来源:mex-content-box.c


示例4: gtk_search_entry_icon_release

static guint signals[LAST_SIGNAL] = { 0 };

typedef struct {
  guint delayed_changed_id;
} GtkSearchEntryPrivate;

static void gtk_search_entry_icon_release  (GtkEntry             *entry,
                                            GtkEntryIconPosition  icon_pos);
static void gtk_search_entry_changed       (GtkEditable          *editable);
static void gtk_search_entry_editable_init (GtkEditableInterface *iface);

static GtkEditableInterface *parent_editable_iface;

G_DEFINE_TYPE_WITH_CODE (GtkSearchEntry, gtk_search_entry, GTK_TYPE_ENTRY,
                         G_ADD_PRIVATE (GtkSearchEntry)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
                                                gtk_search_entry_editable_init))

/* 150 mseconds of delay */
#define DELAYED_TIMEOUT_ID 150

/* This widget got created without a private structure, meaning
 * that we cannot now have one without breaking ABI */
#define GET_PRIV(e) ((GtkSearchEntryPrivate *) gtk_search_entry_get_instance_private ((GtkSearchEntry *) (e)))

static void
gtk_search_entry_finalize (GObject *object)
{
  GtkSearchEntryPrivate *priv = GET_PRIV (object);

  if (priv->delayed_changed_id > 0)
    g_source_remove (priv->delayed_changed_id);
开发者ID:3v1n0,项目名称:gtk,代码行数:32,代码来源:gtksearchentry.c


示例5: impl_device_get_nsp_list

#include "nm-properties-changed-signal.h"
#include "nm-connection.h"
#include "nm-setting-connection.h"
#include "nm-setting-wimax.h"
#include "nm-utils.h"
#include "nm-rfkill.h"
#include "iwmxsdk.h"

static gboolean impl_device_get_nsp_list (NMDeviceWimax *device, GPtrArray **list, GError **error);

#include "nm-device-wimax-glue.h"

static void device_interface_init (NMDeviceInterface *iface_class);

G_DEFINE_TYPE_EXTENDED (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE, 0,
						G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))

enum {
	PROP_0,
	PROP_HW_ADDRESS,
	PROP_ACTIVE_NSP,
	PROP_CENTER_FREQ,
	PROP_RSSI,
	PROP_CINR,
	PROP_TX_POWER,
	PROP_BSID,

	LAST_PROP
};

enum {
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:31,代码来源:nm-device-wimax.c


示例6: sexy_icon_entry_expose

static gint sexy_icon_entry_expose(GtkWidget *widget, GdkEventExpose *event);
static gint sexy_icon_entry_enter_notify(GtkWidget *widget,
											   GdkEventCrossing *event);
static gint sexy_icon_entry_leave_notify(GtkWidget *widget,
											   GdkEventCrossing *event);
static gint sexy_icon_entry_button_press(GtkWidget *widget,
											   GdkEventButton *event);
static gint sexy_icon_entry_button_release(GtkWidget *widget,
												 GdkEventButton *event);

static GtkEntryClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = {0};

G_DEFINE_TYPE_EXTENDED(SexyIconEntry, sexy_icon_entry, GTK_TYPE_ENTRY,
					   0,
					   G_IMPLEMENT_INTERFACE(GTK_TYPE_EDITABLE,
											 sexy_icon_entry_editable_init));

static void
sexy_icon_entry_class_init(SexyIconEntryClass *klass)
{
	GObjectClass *gobject_class;
	GtkObjectClass *object_class;
	GtkWidgetClass *widget_class;
//	GtkEntryClass *entry_class;

	parent_class = g_type_class_peek_parent(klass);

	gobject_class = G_OBJECT_CLASS(klass);
	object_class  = GTK_OBJECT_CLASS(klass);
	widget_class  = GTK_WIDGET_CLASS(klass);
//	entry_class   = GTK_ENTRY_CLASS(klass);
开发者ID:ib,项目名称:xarchiver,代码行数:32,代码来源:sexy-icon-entry.c


示例7: clutter_container_iface_init

 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Written by: Thomas Wood <[email protected]>
 *
 */

#include <config.h>
#include "mx-notebook.h"
#include "mx-private.h"
#include "mx-focusable.h"

static void clutter_container_iface_init (ClutterContainerIface *iface);
static void mx_focusable_iface_init (MxFocusableIface *iface);

G_DEFINE_TYPE_WITH_CODE (MxNotebook, mx_notebook, MX_TYPE_WIDGET,
                         G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
                                                clutter_container_iface_init)
                         G_IMPLEMENT_INTERFACE (MX_TYPE_FOCUSABLE,
                                                mx_focusable_iface_init))

#define NOTEBOOK_PRIVATE(o) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), MX_TYPE_NOTEBOOK, MxNotebookPrivate))

struct _MxNotebookPrivate
{
  ClutterActor *current_page;

  GList *children;
};

enum
{
开发者ID:3v1n0,项目名称:mx,代码行数:32,代码来源:mx-notebook.c


示例8: G_DEFINE_TYPE_WITH_CODE

{
  EVENT_ACTIVATED,
  LAST_SIGNAL
};

enum
{
  PROP_0,
  PROP_DATE,
  NUM_PROPS
};

static guint signals[LAST_SIGNAL] = { 0, };

G_DEFINE_TYPE_WITH_CODE (GcalWeekView, gcal_week_view, GTK_TYPE_BOX,
                         G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init)
                         G_IMPLEMENT_INTERFACE (E_TYPE_CAL_DATA_MODEL_SUBSCRIBER,
                                                gcal_data_model_subscriber_interface_init));

/* Callbacks */
static void
on_event_activated (GcalWeekView *self,
                    GtkWidget    *widget)
{
  g_signal_emit (self, signals[EVENT_ACTIVATED], 0, widget);
}

/* Auxiliary methods */
static gboolean
update_grid_scroll_position (GcalWeekView *self)
{
开发者ID:pandusonu2,项目名称:gnome-calendar,代码行数:31,代码来源:gcal-week-view.c


示例9: async_initable_iface_init

 *
 * Author: Aleksander Morgado <[email protected]>
 */

#include "ModemManager.h"
#include <mm-gdbus-manager.h>
#include "mm-manager.h"

static void initable_iface_init       (GInitableIface      *iface);
static void async_initable_iface_init (GAsyncInitableIface *iface);

static GInitableIface      *initable_parent_iface;
static GAsyncInitableIface *async_initable_parent_iface;

G_DEFINE_TYPE_EXTENDED (MMManager, mm_manager, MM_GDBUS_TYPE_OBJECT_MANAGER_CLIENT, 0,
                        G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)
                        G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, async_initable_iface_init));

struct _MMManagerPrivate {
  /* The proxy for the Manager interface */
  MmGdbusOrgFreedesktopModemManager1 *manager_iface_proxy;
};

/**
 * mm_manager_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
开发者ID:telemaco,项目名称:ModemManager,代码行数:31,代码来源:mm-manager.c


示例10: glade_box_editor_editable_init

static void glade_box_editor_editable_init (GladeEditableIface * iface);
static void glade_box_editor_grab_focus (GtkWidget * widget);
static void use_center_child_toggled (GtkWidget *widget, GladeBoxEditor * box_editor);


struct _GladeBoxEditorPrivate
{
  GtkWidget *embed;
  GtkWidget *use_center_child;
};

static GladeEditableIface *parent_editable_iface;

G_DEFINE_TYPE_WITH_CODE (GladeBoxEditor, glade_box_editor, GLADE_TYPE_EDITOR_SKELETON,
                         G_ADD_PRIVATE (GladeBoxEditor)
                         G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
                                                glade_box_editor_editable_init));

static void
glade_box_editor_class_init (GladeBoxEditorClass * klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  widget_class->grab_focus = glade_box_editor_grab_focus;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-box-editor.ui");
  gtk_widget_class_bind_template_child_private (widget_class, GladeBoxEditor, embed);
  gtk_widget_class_bind_template_child_private (widget_class, GladeBoxEditor, use_center_child);

  gtk_widget_class_bind_template_callback (widget_class, use_center_child_toggled);
}
开发者ID:GNOME,项目名称:glade,代码行数:31,代码来源:glade-box-editor.c


示例11: mech_surface_initable_iface_init

  gint height;
  gint cache_width;
  gint cache_height;

  gdouble scale_x;
  gdouble scale_y;

  guint surface_type  : 3;
  guint renderer_type : 2;
};

static void mech_surface_initable_iface_init (GInitableIface *iface);

G_DEFINE_ABSTRACT_TYPE_WITH_CODE (MechSurface, mech_surface, G_TYPE_OBJECT,
                                  G_ADD_PRIVATE (MechSurface)
                                  G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
                                                         mech_surface_initable_iface_init))

static gboolean
mech_surface_initable_init (GInitable     *initable,
                            GCancellable  *cancellable,
                            GError       **error)
{
  return TRUE;
}

static void
mech_surface_initable_iface_init (GInitableIface *iface)
{
  iface->init = mech_surface_initable_init;
}
开发者ID:arthurfait,项目名称:mechane,代码行数:31,代码来源:mech-surface.c


示例12: gtk_style_cascade_iter_clear

    }
  gtk_style_cascade_iter_clear (&iter);
}

static void
gtk_style_cascade_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface)
{
  iface->get_color = gtk_style_cascade_get_color;
  iface->get_settings = gtk_style_cascade_get_settings;
  iface->get_scale = gtk_style_cascade_get_scale;
  iface->get_keyframes = gtk_style_cascade_get_keyframes;
  iface->lookup = gtk_style_cascade_lookup;
}

G_DEFINE_TYPE_EXTENDED (GtkStyleCascade, _gtk_style_cascade, G_TYPE_OBJECT, 0,
                        G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
                                               gtk_style_cascade_provider_iface_init)
                        G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER_PRIVATE,
                                               gtk_style_cascade_provider_private_iface_init));

static void
gtk_style_cascade_dispose (GObject *object)
{
  GtkStyleCascade *cascade = GTK_STYLE_CASCADE (object);

  _gtk_style_cascade_set_parent (cascade, NULL);
  g_array_unref (cascade->providers);

  G_OBJECT_CLASS (_gtk_style_cascade_parent_class)->dispose (object);
}

static void
开发者ID:mariospr,项目名称:gtk,代码行数:32,代码来源:gtkstylecascade.c


示例13: G_DEFINE_TYPE_WITH_CODE

 * Responsible for the ordering of the various contained Clip(s). A
 * timeline layer has a "priority" property, which is used to manage the
 * priorities of individual Clips. Two layers should not have the
 * same priority within a given timeline.
 */

#include "ges-internal.h"
#include "ges-layer.h"
#include "ges.h"
#include "ges-source-clip.h"

static void ges_meta_container_interface_init
    (GESMetaContainerInterface * iface);

G_DEFINE_TYPE_WITH_CODE (GESLayer, ges_layer,
    G_TYPE_INITIALLY_UNOWNED, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, NULL)
    G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
        ges_meta_container_interface_init));

struct _GESLayerPrivate
{
  /*< private > */
  GList *clips_start;           /* The Clips sorted by start and
                                 * priority */

  guint32 priority;             /* The priority of the layer within the
                                 * containing timeline */
  gboolean auto_transition;
};

typedef struct
开发者ID:dark-al,项目名称:gst-editing-services-old,代码行数:31,代码来源:ges-layer.c


示例14: pkg_graph_init

/**
 * SECTION:pkg-graph-2d
 * @title: PkgGraph2d
 * @short_description: 
 *
 * Section overview.
 */

static void pkg_graph_init (PkgGraphIface *iface);

G_DEFINE_TYPE_EXTENDED(PkgGraph2d,
                       pkg_graph_2d,
                       CLUTTER_TYPE_GROUP,
                       0,
                       G_IMPLEMENT_INTERFACE(PKG_TYPE_GRAPH,
                                             pkg_graph_init))

struct _PkgGraph2dPrivate
{
	ClutterActor *texture;
	ClutterActor *renderer;
	PkgScale     *x_scale;
	PkgScale     *y_scale;
	gdouble       x_padding;
	gdouble       y_padding;
	gchar        *x_label;
	gchar        *y_label;
};

/**
 * pkg_graph_2d_new:
开发者ID:chergert,项目名称:graph-hack,代码行数:31,代码来源:pkg-graph-2d.c


示例15: G_DEFINE_TYPE_WITH_CODE

  gchar *label_text;
  GtkWidget *label_widget;
  GtkWidget *icon_widget;

  GtkSizeGroup *text_size_group;

  guint use_underline : 1;
  guint contents_invalid : 1;
};

static GtkActivatableIface *parent_activatable_iface;
static guint                toolbutton_signals[LAST_SIGNAL] = { 0 };

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_DEFINE_TYPE_WITH_CODE (GtkToolButton, gtk_tool_button, GTK_TYPE_TOOL_ITEM,
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE, gtk_tool_button_actionable_iface_init)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE, gtk_tool_button_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS

static void
gtk_tool_button_class_init (GtkToolButtonClass *klass)
{
  GObjectClass *object_class;
  GtkWidgetClass *widget_class;
  GtkToolItemClass *tool_item_class;

  object_class = (GObjectClass *)klass;
  widget_class = (GtkWidgetClass *)klass;
  tool_item_class = (GtkToolItemClass *)klass;

  object_class->set_property = gtk_tool_button_set_property;
开发者ID:raja651,项目名称:gtk,代码行数:31,代码来源:gtktoolbutton.c


示例16: gum_gcc_backtracer_iface_init

  gpointer start_address;
};

static void gum_gcc_backtracer_iface_init (gpointer g_iface,
    gpointer iface_data);
static void gum_gcc_backtracer_generate (GumBacktracer * backtracer,
    const GumCpuContext * cpu_context,
    GumReturnAddressArray * return_addresses);
static _Unwind_Reason_Code gum_gcc_backtracer_append_address (
    struct _Unwind_Context * context, void * user_data);

G_DEFINE_TYPE_EXTENDED (GumGccBacktracer,
                        gum_gcc_backtracer,
                        G_TYPE_OBJECT,
                        0,
                        G_IMPLEMENT_INTERFACE (GUM_TYPE_BACKTRACER,
                                               gum_gcc_backtracer_iface_init));

static void
gum_gcc_backtracer_class_init (GumGccBacktracerClass * klass)
{
}

static void
gum_gcc_backtracer_iface_init (gpointer g_iface,
                                   gpointer iface_data)
{
  GumBacktracerIface * iface = (GumBacktracerIface *) g_iface;

  iface->generate = gum_gcc_backtracer_generate;
}
开发者ID:pombredanne,项目名称:frida-gum,代码行数:31,代码来源:gumgccbacktracer.c


示例17: G_DEFINE_TYPE_WITH_CODE

  /* Autosave timeout timer */
  guint autosave_timeout;

  /* Header object */
  GtrHeader *header;

  GtrPoState state;

  /* Marks if the file was changed;  */
  guint file_changed : 1;
} GtrPoPrivate;


G_DEFINE_TYPE_WITH_CODE (GtrPo, gtr_po, G_TYPE_OBJECT,
                         G_ADD_PRIVATE (GtrPo)
                         G_IMPLEMENT_INTERFACE (GTR_TYPE_MESSAGE_CONTAINER,
                                                gtr_po_message_container_init))

enum
{
  PROP_0,
  PROP_LOCATION,
  PROP_STATE
};

static gchar *message_error = NULL;

static void
gtr_po_set_property (GObject      *object,
                     guint         prop_id,
                     const GValue *value,
                     GParamSpec   *pspec)
开发者ID:GNOME,项目名称:gtranslator,代码行数:32,代码来源:gtr-po.c


示例18: gtk_frame_extended_layout_init

static void gtk_frame_buildable_init                (GtkBuildableIface *iface);
static void gtk_frame_buildable_add_child           (GtkBuildable *buildable,
						     GtkBuilder   *builder,
						     GObject      *child,
						     const gchar  *type);

static void gtk_frame_extended_layout_init (GtkExtendedLayoutIface *iface);
static void gtk_frame_get_desired_width    (GtkExtendedLayout      *layout,
                                            gint                   *minimum_size,
                                            gint                   *natural_size);
static void gtk_frame_get_desired_height   (GtkExtendedLayout      *layout,
                                            gint                   *minimum_size,
                                            gint                   *natural_size);

G_DEFINE_TYPE_WITH_CODE (GtkFrame, gtk_frame, GTK_TYPE_BIN,
			 G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
						gtk_frame_buildable_init)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_EXTENDED_LAYOUT,
                                                gtk_frame_extended_layout_init))

static void
gtk_frame_class_init (GtkFrameClass *class)
{
  GObjectClass *gobject_class;
  GtkWidgetClass *widget_class;
  GtkContainerClass *container_class;

  gobject_class = (GObjectClass*) class;
  widget_class = GTK_WIDGET_CLASS (class);
  container_class = GTK_CONTAINER_CLASS (class);

  gobject_class->set_property = gtk_frame_set_property;
开发者ID:gtk,项目名称:gtk,代码行数:32,代码来源:gtkframe.c


示例19: gtk_level_bar_set_value_internal

  GtkCssNode *trough_node;
  GtkCssNode **block_node;
  guint n_blocks;

  guint inverted : 1;
};

static void gtk_level_bar_set_value_internal (GtkLevelBar *self,
                                              gdouble      value);

static void gtk_level_bar_buildable_init (GtkBuildableIface *iface);

G_DEFINE_TYPE_WITH_CODE (GtkLevelBar, gtk_level_bar, GTK_TYPE_WIDGET,
                         G_ADD_PRIVATE (GtkLevelBar)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
                                                gtk_level_bar_buildable_init))

static GtkLevelBarOffset *
gtk_level_bar_offset_new (const gchar *name,
                          gdouble      value)
{
  GtkLevelBarOffset *offset = g_slice_new0 (GtkLevelBarOffset);

  offset->name = g_strdup (name);
  offset->value = value;

  return offset;
}
开发者ID:Therzok,项目名称:gtk,代码行数:29,代码来源:gtklevelbar.c


示例20: modem_init

 *
 * Copyright (C) 2008 - 2009 Novell, Inc.
 * Copyright (C) 2009 Red Hat, Inc.
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "mm-modem-nokia.h"
#include "mm-serial-parsers.h"

static void modem_init (MMModem *modem_class);

G_DEFINE_TYPE_EXTENDED (MMModemNokia, mm_modem_nokia, MM_TYPE_GENERIC_GSM, 0,
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM, modem_init))


MMModem *
mm_modem_nokia_new (const char *device,
                    const char *driver,
                    const char *plugin)
{
    g_return_val_if_fail (device != NULL, NULL);
    g_return_val_if_fail (driver != NULL, NULL);
    g_return_val_if_fail (plugin != NULL, NULL);

    return MM_MODEM (g_object_new (MM_TYPE_MODEM_NOKIA,
                                   MM_MODEM_MASTER_DEVICE, device,
                                   MM_MODEM_DRIVER, driver,
                                   MM_MODEM_PLUGIN, plugin,
开发者ID:MasterOfPupets,项目名称:ModemManager,代码行数:31,代码来源:mm-modem-nokia.c



注:本文中的G_IMPLEMENT_INTERFACE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ G_INITIALIZE函数代码示例发布时间:2022-05-30
下一篇:
C++ G_FreeEntity函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap