这篇教程C++ GSIZE_TO_POINTER函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GSIZE_TO_POINTER函数的典型用法代码示例。如果您正苦于以下问题:C++ GSIZE_TO_POINTER函数的具体用法?C++ GSIZE_TO_POINTER怎么用?C++ GSIZE_TO_POINTER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GSIZE_TO_POINTER函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: tail_alignstatic voidtail_align (gpointer ptr, gsize size, const AlignmentCriteria * criteria, TailAlignResult * result){ gsize unaligned_start_address, unaligned_end_address; gsize next_tail_boundary; gsize aligned_start_address, aligned_end_address; unaligned_start_address = GPOINTER_TO_SIZE (ptr); unaligned_end_address = unaligned_start_address + size - 1; next_tail_boundary = ((unaligned_end_address / criteria->tail) + 1) * criteria->tail; aligned_start_address = ((next_tail_boundary - size) / criteria->front) * criteria->front; if (aligned_start_address < unaligned_start_address) { aligned_start_address += criteria->tail; next_tail_boundary += criteria->tail; } aligned_end_address = aligned_start_address + size - 1; result->aligned_ptr = GSIZE_TO_POINTER (aligned_start_address); result->next_tail_ptr = GSIZE_TO_POINTER (next_tail_boundary); result->gap_size = next_tail_boundary - (aligned_end_address + 1);}
开发者ID:Fitblip,项目名称:frida-gum,代码行数:26,
示例2: torflowrelay_addMeasurementvoid torflowrelay_addMeasurement(TorFlowRelay* relay, gsize contentLength, gsize roundTripTime, gsize payloadTime, gsize totalTime) { g_assert(relay); relay->transferTimes = g_slist_prepend(relay->transferTimes, GSIZE_TO_POINTER(totalTime)); relay->transferSizes = g_slist_prepend(relay->transferSizes, GSIZE_TO_POINTER(contentLength));}
开发者ID:shadow,项目名称:shadow-plugin-tor,代码行数:7,
示例3: build_address_lookupint build_address_lookup(char* first_snapshot, char* second_snapshot) { ssize_t rc; char* line; size_t len = 0; uint32_t addr; u_long taint_val; address_lookup = g_hash_table_new(g_direct_hash, g_direct_equal); second_address_lookup = g_hash_table_new(g_direct_hash, g_direct_equal); /* First Snapshot ############################################# */ FILE* fp = fopen(first_snapshot, "r"); assert(fp); while ((rc = getline(&line, &len, fp)) != -1) { sscanf(line, "%x: %lu/n", &addr, &taint_val); g_hash_table_insert(address_lookup, GUINT_TO_POINTER(addr), GSIZE_TO_POINTER(taint_val)); } /* Second Snapshot ############################################# */ fp = fopen(second_snapshot, "r"); assert(fp); while ((rc = getline(&line, &len, fp)) != -1) { sscanf(line, "%x: %lu/n", &addr, &taint_val); g_hash_table_insert(second_address_lookup, GUINT_TO_POINTER(addr), GSIZE_TO_POINTER(taint_val)); } return 1;}
开发者ID:andrewjylee,项目名称:taint_trackers,代码行数:27,
示例4: glx_ctx_push_thread_localvoidglx_ctx_push_thread_local(VdpDeviceData *deviceData){ glx_ctx_lock(); Display *dpy = deviceData->display; const Window wnd = deviceData->root; thread_id_t thread_id = get_current_thread_id(); ctx_stack.dpy = glXGetCurrentDisplay(); if (!ctx_stack.dpy) ctx_stack.dpy = dpy; ctx_stack.wnd = glXGetCurrentDrawable(); ctx_stack.glc = glXGetCurrentContext(); ctx_stack.element_count ++; struct val_s *val = g_hash_table_lookup(glc_hash_table, GSIZE_TO_POINTER(thread_id)); if (!val) { GLXContext glc = glXCreateContext(dpy, root_vi, root_glc, GL_TRUE); assert(glc); val = make_val(dpy, glc); g_hash_table_insert(glc_hash_table, GSIZE_TO_POINTER(thread_id), val); // try cleanup expired entries g_hash_table_foreach_remove(glc_hash_table, is_thread_expired, NULL); } assert(val->dpy == dpy); glXMakeCurrent(dpy, wnd, val->glc);}
开发者ID:Dangku,项目名称:libvdpau-va-gl,代码行数:29,
示例5: _insert_grl_mex_linkstatic void_insert_grl_mex_link (GrlKeyID grl_key, MexContentMetadata mex_key){ /* g_hash_table_insert (grl_to_mex, */ /* GSIZE_TO_POINTER (grl_key), */ /* GSIZE_TO_POINTER (mex_key)); */ g_hash_table_insert (mex_to_grl, GSIZE_TO_POINTER (mex_key), GSIZE_TO_POINTER (grl_key));}
开发者ID:jpwhiting,项目名称:media-explorer,代码行数:10,
示例6: register_conversion_functionstatic voidregister_conversion_function (GType type, ParseFunc parse, ToStringFunc to_string){ if (parse) g_hash_table_insert (parse_funcs, GSIZE_TO_POINTER (type), parse); if (to_string) g_hash_table_insert (to_string_funcs, GSIZE_TO_POINTER (type), to_string);}
开发者ID:nacho,项目名称:gtk-,代码行数:10,
示例7: ipcam_event_input_msg_handler_read_paramstatic gbooleanipcam_event_input_msg_handler_read_param(IpcamEventInputMsgHandler *handler, JsonBuilder *builder, const gchar *name){ IpcamIConfig *iconfig; g_object_get(G_OBJECT(handler), "app", &iconfig, NULL); gboolean ret = FALSE; GVariant *value = NULL; value = ipcam_iconfig_read(iconfig, IPCAM_EVENT_INPUT_TYPE, name, "enable"); if (value) { json_builder_set_member_name(builder, "enable"); json_builder_add_boolean_value(builder, g_variant_get_boolean(value)); g_variant_unref(value); } value = ipcam_iconfig_read(iconfig, IPCAM_EVENT_INPUT_TYPE, name, "schedules"); if (value) { Schedules *sche; if (IS_64BIT_MACHINE) { sche = GSIZE_TO_POINTER(g_variant_get_uint64(value)); } else { sche = GSIZE_TO_POINTER(g_variant_get_uint32(value)); } gint i = 0; json_builder_set_member_name(builder, "schedules"); json_builder_begin_object(builder); if (sche) { for (i = ENUM_MON; i < ENUM_WEEKDAY_LAST; i++) { if (sche->schedule[i]) { json_builder_set_member_name(builder, weekday_name[i]); json_builder_add_string_value(builder, sche->schedule[i]); g_free(sche->schedule[i]); } } g_free(sche); } json_builder_end_object(builder); g_variant_unref(value); } return ret;}
开发者ID:TangCheng,项目名称:iconfig,代码行数:51,
示例8: main_loopstatic voidmain_loop (){ log_write ("openvassd %s started/n", OPENVASSD_VERSION); proctitle_set ("openvassd: Waiting for incoming connections"); for (;;) { int soc; int family; unsigned int lg_address; struct sockaddr_in6 address6; struct sockaddr_in6 *p_addr; struct arglist *globals; struct addrinfo *ai; check_and_reload (); wait_for_children1 (); ai = arg_get_value (g_options, "addr"); lg_address = sizeof (struct sockaddr_in6); soc = accept (global_iana_socket, (struct sockaddr *) (&address6), &lg_address); if (soc == -1) continue; /* * MA: you cannot share an open SSL connection through fork/multithread * The SSL connection shall be open _after_ the fork */ globals = emalloc (sizeof (struct arglist)); arg_add_value (globals, "global_socket", ARG_INT, -1, GSIZE_TO_POINTER (soc)); arg_add_value (globals, "plugins", ARG_ARGLIST, -1, global_plugins); arg_add_value (globals, "preferences", ARG_ARGLIST, -1, global_preferences); p_addr = emalloc (sizeof (struct sockaddr_in6)); family = ai->ai_family; memcpy (p_addr, &address6, sizeof (address6)); arg_add_value (globals, "client_address", ARG_PTR, -1, p_addr); arg_add_value (globals, "family", ARG_INT, -1, GSIZE_TO_POINTER (family)); /* we do not want to create an io thread, yet so the last argument is -1 */ if (create_process ((process_func_t) scanner_thread, globals) < 0) { log_write ("Could not fork - client won't be served"); sleep (2); } close (soc); arg_free (globals); }}
开发者ID:manfredgithub,项目名称:Openvas-Source,代码行数:50,
示例9: gum_store_runtime_boundsstatic gbooleangum_store_runtime_bounds (const GumModuleDetails * details, GumRuntimeBounds * bounds){ const GumMemoryRange * range = details->range; if (strcmp (details->name, "libandroid_runtime.so") != 0) return TRUE; bounds->start = GSIZE_TO_POINTER (range->base_address); bounds->end = GSIZE_TO_POINTER (range->base_address + range->size); return FALSE;}
开发者ID:aonorin,项目名称:frida-gum,代码行数:14,
示例10: af_animator_register_type_transformationvoidaf_animator_register_type_transformation (GType type, AfTypeTransformationFunc trans_func){ if (!transformable_types) transformable_types = g_hash_table_new (g_direct_hash, g_direct_equal); if (!trans_func) g_hash_table_remove (transformable_types, GSIZE_TO_POINTER (type)); else g_hash_table_insert (transformable_types, GSIZE_TO_POINTER (type), trans_func);}
开发者ID:troja84,项目名称:af,代码行数:14,
示例11: gum_script_backend_obtain_v8GumScriptBackend *gum_script_backend_obtain_v8 (void){ static volatile gsize gonce_value; if (g_once_init_enter (&gonce_value)) { GumScriptBackend * backend = NULL; if (gum_query_is_rwx_supported ()) {#ifdef HAVE_V8 backend = GUM_SCRIPT_BACKEND ( g_object_new (GUM_V8_TYPE_SCRIPT_BACKEND, NULL));#endif if (backend != NULL) _gum_register_early_destructor (gum_script_backend_deinit_v8); } g_once_init_leave (&gonce_value, GPOINTER_TO_SIZE (backend) + 1); } return GUM_SCRIPT_BACKEND (GSIZE_TO_POINTER (gonce_value - 1));}
开发者ID:aonorin,项目名称:frida-gum,代码行数:25,
示例12: gum_emit_malloc_rangestatic gbooleangum_emit_malloc_range (const GumMallocRangeDetails * details, gpointer user_data){ GumJscMatchContext * mc = user_data; GumJscCore * core = mc->self->core; GumJscScope scope = GUM_JSC_SCOPE_INIT (core); JSContextRef ctx = mc->ctx; JSObjectRef range; JSValueRef result; gboolean proceed; gchar * str; range = JSObjectMake (ctx, NULL, NULL); _gumjs_object_set_pointer (ctx, range, "base", GSIZE_TO_POINTER (details->range->base_address), core); _gumjs_object_set_uint (ctx, range, "size", details->range->size); result = JSObjectCallAsFunction (ctx, mc->on_match, NULL, 1, (JSValueRef *) &range, &scope.exception); _gum_jsc_scope_flush (&scope); proceed = TRUE; if (result != NULL && _gumjs_string_try_get (ctx, result, &str, NULL)) { proceed = strcmp (str, "stop") != 0; g_free (str); } return proceed;}
开发者ID:terry2012,项目名称:frida-gum,代码行数:31,
示例13: find_image_text_section_idsstatic GSList *find_image_text_section_ids (gconstpointer address){ GSList * ids = NULL; gsize section_count = 0; const gum_mach_header_t * header = address; guint8 * p; guint cmd_index, section_index; p = (guint8 *) (header + 1); for (cmd_index = 0; cmd_index != header->ncmds; cmd_index++) { struct load_command * lc = (struct load_command *) p; if (lc->cmd == GUM_LC_SEGMENT) { gum_segment_command_t * segcmd = (gum_segment_command_t *) lc; if ((segcmd->initprot & VM_PROT_EXECUTE) != 0) { for (section_index = 0; section_index != segcmd->nsects; section_index++) { ids = g_slist_prepend (ids, GSIZE_TO_POINTER (section_count + section_index + 1)); } } section_count += segcmd->nsects; } p += lc->cmdsize; } return g_slist_reverse (ids);}
开发者ID:idkwim,项目名称:frida-gum,代码行数:35,
示例14: gum_metal_array_get_extentsvoidgum_metal_array_get_extents (GumMetalArray * self, gpointer * start, gpointer * end){ GumMemoryRange range; guint size; size = (guint) ((guint8 *) gum_metal_array_element_at (self, self->capacity) - (guint8 *) self->data); gum_query_page_allocation_range (self->data, gum_round_up_to_page_size (size), &range); *start = GSIZE_TO_POINTER (range.base_address); *end = GSIZE_TO_POINTER (range.base_address + range.size);}
开发者ID:frida,项目名称:frida-gum,代码行数:16,
示例15: tny_gnome_keyring_password_getter_register_typestatic gpointertny_gnome_keyring_password_getter_register_type (gpointer notused){ GType type = 0; static const GTypeInfo info = { sizeof (TnyGnomeKeyringPasswordGetterClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) tny_gnome_keyring_password_getter_class_init, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ sizeof (TnyGnomeKeyringPasswordGetter), 0, /* n_preallocs */ tny_gnome_keyring_password_getter_instance_init, /* instance_init */ NULL }; static const GInterfaceInfo tny_password_getter_info = { (GInterfaceInitFunc) tny_password_getter_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; type = g_type_register_static (G_TYPE_OBJECT, "TnyGnomeKeyringPasswordGetter", &info, 0); g_type_add_interface_static (type, TNY_TYPE_PASSWORD_GETTER, &tny_password_getter_info); return GSIZE_TO_POINTER (type);}
开发者ID:Codeminded,项目名称:tinymail,代码行数:35,
示例16: ensure_module_ifacesstatic voidensure_module_ifaces (StoragedLinuxDriveObject *object, StoragedModuleManager *module_manager){ GList *l; ModuleInterfaceEntry *entry; StoragedModuleInterfaceInfo *ii; /* Assume all modules are either unloaded or loaded at the same time, so don't regenerate entries */ if (object->module_ifaces == NULL) { object->module_ifaces = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) free_module_interface_entry); l = storaged_module_manager_get_drive_object_iface_infos (module_manager); for (; l; l = l->next) { ii = l->data; entry = g_new0 (ModuleInterfaceEntry, 1); entry->has_func = ii->has_func; entry->connect_func = ii->connect_func; entry->update_func = ii->update_func; g_hash_table_replace (object->module_ifaces, GSIZE_TO_POINTER (ii->skeleton_type), entry); } }}
开发者ID:frankzhao,项目名称:storaged,代码行数:25,
示例17: gom_repository_find_asyncvoidgom_repository_find_async (GomRepository *repository, GType resource_type, GomFilter *filter, GAsyncReadyCallback callback, gpointer user_data){ GomRepositoryPrivate *priv; GSimpleAsyncResult *simple; g_return_if_fail(GOM_IS_REPOSITORY(repository)); g_return_if_fail(g_type_is_a(resource_type, GOM_TYPE_RESOURCE)); g_return_if_fail(resource_type != GOM_TYPE_RESOURCE); g_return_if_fail(!filter || GOM_IS_FILTER(filter)); g_return_if_fail(callback != NULL); priv = repository->priv; simple = g_simple_async_result_new(G_OBJECT(repository), callback, user_data, gom_repository_find_async); g_object_set_data(G_OBJECT(simple), "resource-type", GSIZE_TO_POINTER(resource_type)); g_object_set_data_full(G_OBJECT(simple), "filter", filter ? g_object_ref(filter) : NULL, filter ? g_object_unref : NULL); gom_adapter_queue_read(priv->adapter, gom_repository_find_cb, simple);}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:28,
示例18: gjs_gtype_create_gtype_wrapperJSObject *gjs_gtype_create_gtype_wrapper (JSContext *context, GType gtype){ JSObject *object; JSObject *global; JS_BeginRequest(context); /* put constructor for GIRepositoryGType() in the global namespace */ global = gjs_get_import_global(context); gjs_gtype_create_proto(context, global, "GIRepositoryGType", NULL); object = g_type_get_qdata(gtype, gjs_get_gtype_wrapper_quark()); if (object != NULL) goto out; object = JS_NewObject(context, &gjs_gtype_class, NULL, NULL); if (object == NULL) goto out; JS_SetPrivate(context, object, GSIZE_TO_POINTER(gtype)); g_type_set_qdata(gtype, gjs_get_gtype_wrapper_quark(), object); out: JS_EndRequest(context); return object;}
开发者ID:Cobinja,项目名称:cjs,代码行数:28,
示例19: on_end_elementstatic voidon_end_element (G_GNUC_UNUSED GMarkupParseContext *context, const gchar *el_name, gpointer user_data, G_GNUC_UNUSED GError **error){ CdkStyleScheme *self = CDK_STYLE_SCHEME (user_data); if (g_strcmp0 (el_name, "scheme") == 0) { self->priv->in_scheme_tag = FALSE; return; } else if (self->priv->in_scheme_tag && self->priv->style_id >= 0 && g_strcmp0 (el_name, "style") == 0) { CdkStyle *style = cdk_style_new (); style->fore = self->priv->fore_color; style->back = self->priv->back_color; style->bold = self->priv->bold; style->italic = self->priv->italic; style->font = self->priv->font; style->size = self->priv->size; g_hash_table_insert (self->priv->style_map, GSIZE_TO_POINTER (self->priv->style_id), style); //g_debug ("added style '%u'", (guint) self->priv->style_id); self->priv->style_id = -1; }}
开发者ID:codebrainz,项目名称:cdk-plugin,代码行数:32,
示例20: cdk_style_id_for_cursor_kindCdkStyleIDcdk_style_id_for_cursor_kind (guint cursor_kind){ if (G_UNLIKELY (cursor_map == NULL)) return CDK_STYLE_DEFAULT; return GPOINTER_TO_SIZE (g_hash_table_lookup (cursor_map, GSIZE_TO_POINTER (cursor_kind)));}
开发者ID:codebrainz,项目名称:cdk-plugin,代码行数:7,
示例21: tny_camel_default_connection_policy_register_typestatic gpointertny_camel_default_connection_policy_register_type (gpointer notused){ GType type = 0; static const GTypeInfo info = { sizeof (TnyCamelDefaultConnectionPolicyClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) tny_camel_default_connection_policy_class_init, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ sizeof (TnyCamelDefaultConnectionPolicy), 0, /* n_preallocs */ tny_camel_default_connection_policy_instance_init, /* instance_init */ NULL }; static const GInterfaceInfo tny_connection_policy_info = { (GInterfaceInitFunc) tny_connection_policy_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; type = g_type_register_static (G_TYPE_OBJECT, "TnyCamelDefaultConnectionPolicy", &info, 0); g_type_add_interface_static (type, TNY_TYPE_CONNECTION_POLICY, &tny_connection_policy_info); return GSIZE_TO_POINTER (type);}
开发者ID:Codeminded,项目名称:tinymail,代码行数:35,
示例22: nmt_add_connection_constructedstatic voidnmt_add_connection_constructed (GObject *object){ NmtAddConnectionPrivate *priv = NMT_ADD_CONNECTION_GET_PRIVATE (object); NMEditorConnectionTypeData **types; char *text; int i, num_types; if (priv->secondary_text) { text = g_strdup_printf ("%s/n/n%s", priv->primary_text, priv->secondary_text); } else text = g_strdup (priv->primary_text); nmt_newt_textbox_set_text (priv->textbox, text); g_free (text); types = nm_editor_utils_get_connection_type_list (); for (i = num_types = 0; types[i]; i++) { if (priv->type_filter && !priv->type_filter (types[i]->setting_type, priv->type_filter_data)) continue; nmt_newt_listbox_append (priv->listbox, types[i]->name, GSIZE_TO_POINTER (types[i]->setting_type)); num_types++; } if (num_types == 1) priv->single_type = TRUE; G_OBJECT_CLASS (nmt_add_connection_parent_class)->constructed (object);}
开发者ID:Impulse2000,项目名称:NetworkManager,代码行数:31,
示例23: _tny_gtk_attach_list_model_iterator_register_typestatic gpointer _tny_gtk_attach_list_model_iterator_register_type (gpointer notused){ GType type = 0; static const GTypeInfo info = { sizeof (TnyGtkAttachListModelIteratorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) tny_gtk_attach_list_model_iterator_class_init, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ sizeof (TnyGtkAttachListModelIterator), 0, /* n_preallocs */ tny_gtk_attach_list_model_iterator_instance_init /* instance_init */ }; static const GInterfaceInfo tny_iterator_info = { (GInterfaceInitFunc) tny_iterator_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; type = g_type_register_static (G_TYPE_OBJECT, "TnyGtkAttachListModelIterator", &info, 0); g_type_add_interface_static (type, TNY_TYPE_ITERATOR, &tny_iterator_info); return GSIZE_TO_POINTER (type);}
开发者ID:Codeminded,项目名称:tinymail,代码行数:34,
示例24: tny_camel_partial_msg_receive_strategy_register_typestatic gpointertny_camel_partial_msg_receive_strategy_register_type (gpointer notused){ GType type = 0; static const GTypeInfo info = { sizeof (TnyCamelPartialMsgReceiveStrategyClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) tny_camel_partial_msg_receive_strategy_class_init, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ sizeof (TnyCamelPartialMsgReceiveStrategy), 0, /* n_preallocs */ tny_camel_partial_msg_receive_strategy_instance_init, /* instance_init */ NULL }; static const GInterfaceInfo tny_msg_receive_strategy_info = { (GInterfaceInitFunc) tny_msg_receive_strategy_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; type = g_type_register_static (G_TYPE_OBJECT, "TnyCamelPartialMsgReceiveStrategy", &info, 0); g_type_add_interface_static (type, TNY_TYPE_MSG_RECEIVE_STRATEGY, &tny_msg_receive_strategy_info); return GSIZE_TO_POINTER (type);}
开发者ID:Codeminded,项目名称:tinymail,代码行数:35,
示例25: get_docids_from_msgids/* get a *list* of all messages with the given message id */static GSList*get_docids_from_msgids (MuQuery *query, const char *str, GError **err){ gchar *querystr; MuMsgIter *iter; GSList *lst; querystr = g_strdup_printf ("msgid:%s", str); iter = mu_query_run (query, querystr, FALSE, MU_MSG_FIELD_ID_NONE, FALSE,-1 /*unlimited*/, err); g_free (querystr); if (!iter || mu_msg_iter_is_done (iter)) { mu_util_g_set_error (err, MU_ERROR_NO_MATCHES, "could not find message %s", str); return NULL; } lst = NULL; do { lst = g_slist_prepend (lst, GSIZE_TO_POINTER(mu_msg_iter_get_docid (iter))); } while (mu_msg_iter_next (iter)); mu_msg_iter_destroy (iter); return lst;}
开发者ID:Popsch,项目名称:mu,代码行数:31,
示例26: gwy_resource_class_load/** * gwy_resource_class_load: * @klass: A resource class. * * Loads resources of a resources class from disk. * * Resources are loaded from system directory (and marked constant) and from * user directory (marked modifiable). **/voidgwy_resource_class_load(GwyResourceClass *klass){ gpointer type; gchar *path, *datadir; g_return_if_fail(GWY_IS_RESOURCE_CLASS(klass)); g_return_if_fail(klass->inventory); gwy_inventory_forget_order(klass->inventory); type = GSIZE_TO_POINTER(G_TYPE_FROM_CLASS(klass)); if (!g_slist_find(all_resources, type)) all_resources = g_slist_prepend(all_resources, type); datadir = gwy_find_self_dir("data"); path = g_build_filename(datadir, klass->name, NULL); g_free(datadir); gwy_resource_class_load_dir(path, klass, TRUE); g_free(path); path = g_build_filename(gwy_get_user_dir(), klass->name, NULL); gwy_resource_class_load_dir(path, klass, FALSE); g_free(path); gwy_inventory_restore_order(klass->inventory);}
开发者ID:cbuehler,项目名称:gwyddion,代码行数:36,
示例27: _interface_tweaks_block_all_handlers/* Block all unblocked signal handlers connect to signal ID in object instance. * Returns a list of all signal handlers block to get them unblocked again in * _interface_tweaks_unblock_handlers() */static GSList* _interface_tweaks_block_all_handlers(GObject *inObject, guint inSignalID){ gulong handlerID; GSList *blockedHandlers=NULL; /* Block unblocked signal handlers and keep a list of them */ do { /* Find unblocked signal handler to signal ID in object instance. * This will always the next one as the previous one has blocked * or 0L if all signal handlers were blocked. */ handlerID=g_signal_handler_find( inObject, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_UNBLOCKED, inSignalID, 0, NULL, NULL, NULL); /* Check if we found an unblocked signal handler */ if(handlerID!=0L) { /* Add its signal handler ID to list to signal handlers blocked by us */ blockedHandlers=g_slist_prepend(blockedHandlers, GSIZE_TO_POINTER(handlerID)); /* Block signal */ g_signal_handler_block(inObject, handlerID); } } while(handlerID!=0); /* Return list of block signal handlers */ return(blockedHandlers);}
开发者ID:gmc-holle,项目名称:midori-interface-tweaks,代码行数:39,
注:本文中的GSIZE_TO_POINTER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GSI_UNUSED函数代码示例 C++ GSEL函数代码示例 |