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

C++ RETPTR函数代码示例

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

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



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

示例1: clip_GDK_COLORPARSE

/* Parse a textual specification of a color and fill in the red, green, and
 * blue fields of a GdkColor structure. The color is not allocated, you must
 * call gdk_colormap_alloc_color() yourself. The text string can be in any of
 * the forms accepted by XParseColor; these include name for a color from
 * rgb.txt, such as DarkSlateGray, or a hex specification such as 305050.*/
int
clip_GDK_COLORPARSE(ClipMachine * cm)
{
	gchar * color_name = _clip_parc(cm,1);
	GdkColor color;
	CHECKARG(1,CHARACTER_t);
	if (gdk_color_parse(color_name, &color))
	{
		memset(RETPTR(cm),0,sizeof(ClipVar)); _clip_map(cm,RETPTR(cm));
		_gdk_color_to_map(cm,color,RETPTR(cm));
	}
	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:20,代码来源:gdkcolor.c


示例2: clip_GDK_REGIONXOR

/* Returns the difference between the union and the intersection of two
 * regions. This is a region containing the pixels that are in one of the
 * source regions, but which are not in both. */
int
clip_GDK_REGIONXOR(ClipMachine * ClipMachineMemory)
{
   C_object *creg = _fetch_co_arg(ClipMachineMemory);

   C_object *creg2 = _fetch_cobject(ClipMachineMemory, _clip_spar(ClipMachineMemory, 2));

   C_object *cdest;

   CHECKCOBJ(creg, GDK_IS_REGION(creg->object));
   CHECKARG2(2, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType);
   CHECKCOBJ(creg2, GDK_IS_REGION(creg->object));

   gdk_region_xor(GDK_REGION(creg), GDK_REGION(creg2));

   if (creg)
    {
       cdest = _register_object(ClipMachineMemory, GDK_REGION(creg), GDK_TYPE_REGION, NULL, NULL);
       if (cdest)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cdest->obj);
    }

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:29,代码来源:gdkregion.c


示例3: clip_GTK_ITEMFACTORYNEW

/******************************************************************************
* gtk_ItemFactoryNew( container_type, spath, accel_group ) --> ItemFactoryNewObject
* container_type is  one of :GTK_TYPE_MENU_BAR, GTK_TYPE_MENU or GTK_TYPE_OPTION_MENU
******************************************************************************/
int
clip_GTK_ITEMFACTORYNEW(ClipMachine * cm)
{
        gint		itype = INT_OPTION(cm, 1, CLIP_GTK_TYPE_MENU_BAR);
        const gchar     *path = _clip_parc(cm, 2);
        C_object      *caccel = _fetch_cobject(cm, _clip_spar(cm, 3));
        C_object       *citem ;
        GtkItemFactory  *item ;
        GtkType		 type = 0;

	CHECKARG(1, NUMERIC_t);
	CHECKARG(2, CHARACTER_t);
	CHECKOPT(3, MAP_t); CHECKCOBJOPT(caccel, GTK_IS_ACCEL_GROUP(caccel->object));

        switch (itype)
        {
        	case CLIP_GTK_TYPE_MENU_BAR: type = GTK_TYPE_MENU_BAR; break;
        	case CLIP_GTK_TYPE_MENU: type = GTK_TYPE_MENU; break;
        	case CLIP_GTK_TYPE_OPTION_MENU: type = GTK_TYPE_OPTION_MENU; break;
        }

	item = gtk_item_factory_new(type, path, GTK_ACCEL_GROUP(caccel->object));

	if (item)
	{
		citem = _list_get_cobject(cm,item);
		if (!citem) citem = _register_object(cm,item,GTK_TYPE_ITEM_FACTORY,NULL,NULL);
		if (citem) _clip_mclone(cm,RETPTR(cm),&citem->obj);
	}
	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:37,代码来源:itemfactory.c


示例4: clip_GTK_FILECHOOSERGETURIS

int
clip_GTK_FILECHOOSERGETURIS(ClipMachine * ClipMachineMemory)
{
   C_object *cchooser = _fetch_co_arg(ClipMachineMemory);

   GSList   *list;

   ClipVar  *cv = RETPTR(ClipMachineMemory);

   long      l;

   CHECKCOBJ(cchooser, GTK_IS_FILE_CHOOSER(cchooser->object));

   list = gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(cchooser->object));
   l = g_slist_length(list);

   _clip_array(ClipMachineMemory, cv, 1, &l);
   for (l = 0; list; list = g_slist_next(list), l++)
    {
       ClipVar   c;

       gchar    *str;

       memset(&c, 0, sizeof(c));
       str = (gchar *) list->data;
       _clip_var_str(str, strlen(str), &c);
       _clip_aset(ClipMachineMemory, cv, &c, 1, &l);
       _clip_destroy(ClipMachineMemory, &c);
    }
   g_slist_free(list);

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:35,代码来源:filechooser.c


示例5: clip_GDK_WINDOWSETCURSOR

// Sets shape of mouse cursor
int
clip_GDK_WINDOWSETCURSOR(ClipMachine * ClipMachineMemory)
{
   C_widget *cwin = _fetch_cw_arg(ClipMachineMemory);

   GdkCursorType cursor_type = _clip_parni(ClipMachineMemory, 2);

   CHECKCWID(cwin, GTK_IS_WIDGET);
   CHECKOPT(2, NUMERIC_type_of_ClipVarType);

   if (cwin && cwin->widget)
    {
       GdkCursor *cursor = gdk_cursor_new(cursor_type);

       C_object *ccur;

       if (cursor)
	{
	   ccur = _register_object(ClipMachineMemory, cursor, GDK_TYPE_CURSOR, NULL,
				   (coDestructor) gdk_object_cursor_destructor);
	   ccur->ref_count = 1;
	   _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &ccur->obj);
	}
       gdk_window_set_cursor(cwin->widget->window, cursor);
    }
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:30,代码来源:gdk.c


示例6: clip_EVP_ALG_LIST

int
clip_EVP_ALG_LIST(ClipMachine *mp)
{
	const char *s;
	int i, n;
	ClipVar *rp = RETPTR(mp), *ap;
	long vect[1];

	for(i=0, n=0; (s=alg_names[i]); i++, n++)
		;
	vect[0] = n;
	_clip_array(mp, rp, 1, vect);

	ap = _clip_vptr(rp);

	for(i=0; (s=alg_names[i]); i++)
	{
		ClipVar *vp;
		vp = ap->a.items + i;
		vp->t.type = CHARACTER_t;
		vp->s.str.buf = strdup(s);
		vp->s.str.len = strlen(s);
	}

	return 0;
}
开发者ID:amery,项目名称:clip-itk,代码行数:26,代码来源:crypto.c


示例7: clip_GTK_UIMANAGERNEW

int
clip_GTK_UIMANAGERNEW(ClipMachine * ClipMachineMemory)
{
   ClipVar  *cv = _clip_spar(ClipMachineMemory, 1);

   C_object *cmanager;

   GtkUIManager *manager;

   CHECKOPT(1, MAP_type_of_ClipVarType);

   manager = gtk_ui_manager_new();

   if (manager)
    {
       cmanager = _list_get_cobject(ClipMachineMemory, manager);
       if (!cmanager)
	  cmanager = _register_object(ClipMachineMemory, manager, GTK_TYPE_UI_MANAGER, cv, NULL);
       if (cmanager)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cmanager->obj);
    }

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:26,代码来源:uimanager.c


示例8: clip_GTK_ADJUSTMENTNEW

/**** Adjustment constructor ****/
int
clip_GTK_ADJUSTMENTNEW(ClipMachine * cm)
{
	ClipVar     * cv = _clip_spar (cm, 1);
	gfloat     value = _clip_parnd(cm,2);
	gfloat     lower = _clip_parnd(cm,3);
	gfloat     upper = _clip_parnd(cm,4);
	gfloat  step_inc = _clip_parnd(cm,5);
	gfloat  page_inc = _clip_parnd(cm,6);
	gfloat page_size = _clip_parnd(cm,7);
	GtkWidget *wid = NULL;
	C_widget *cwid;
	CHECKOPT(1,MAP_t);
	CHECKOPT(2,NUMERIC_t); CHECKOPT(3,NUMERIC_t); CHECKOPT(4,NUMERIC_t);
	CHECKOPT(5,NUMERIC_t); CHECKOPT(6,NUMERIC_t); CHECKOPT(7,NUMERIC_t);
	if (_clip_parinfo(cm,2)==UNDEF_t) value = 0;
	if (_clip_parinfo(cm,3)==UNDEF_t) lower = 0;
	if (_clip_parinfo(cm,4)==UNDEF_t) upper = 100;
	if (_clip_parinfo(cm,5)==UNDEF_t) step_inc = 1;
	if (_clip_parinfo(cm,6)==UNDEF_t) page_inc = 10;
	if (_clip_parinfo(cm,7)==UNDEF_t) page_size = 10;
	wid = (GtkWidget*)gtk_adjustment_new(value,lower,upper,step_inc,page_inc,page_size);
	if (!wid) goto err;
	cwid = _register_widget(cm, wid, cv);
	_clip_mclone(cm,RETPTR(cm),&cwid->obj);

	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:31,代码来源:adjustment.c


示例9: clip_GTK_WINDOWNEW

/****  WINDOW constructor ****/
int
clip_GTK_WINDOWNEW(ClipMachine * cm)
{
	ClipVar * cv   = _clip_spar(cm, 1);
	char * title   = _clip_parc(cm, 2);
	gint     typ   = INT_OPTION(cm, 3, 0);
	GtkWidget *wid = NULL;
	C_widget *cwid;
	CHECKOPT(1,MAP_t);
	CHECKOPT(2,CHARACTER_t);
	CHECKOPT(3,NUMERIC_t);

	//wid = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	wid = gtk_window_new(typ);
	if (!wid) goto err;
	if (_clip_parinfo(cm,2)==CHARACTER_t)
		{
		LOCALE_TO_UTF(title);
		gtk_window_set_title(GTK_WINDOW(wid), title);
		FREE_TEXT(title);
		}
	//cwid = (C_widget*)calloc( 1, sizeof(C_widget) );
	cwid = _register_widget(cm, wid, cv);
	cwid->accel_group = gtk_accel_group_new();
	gtk_window_add_accel_group (GTK_WINDOW (wid), cwid->accel_group);
//	gtk_signal_connect( GTK_OBJECT( wid ), "delete-event",
//		GTK_SIGNAL_FUNC( delete_window_handler ), NULL );

	_clip_mclone(cm,RETPTR(cm),&cwid->obj);
	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:34,代码来源:window.c


示例10: clip_GTK_ENTRYCOMPLETIONNEW

int
clip_GTK_ENTRYCOMPLETIONNEW(ClipMachine * ClipMachineMemory)
{
   ClipVar  *cv = _clip_spar(ClipMachineMemory, 1);

   GtkEntryCompletion *completion;

   C_object *ccompletion;

   CHECKOPT(1, MAP_type_of_ClipVarType);

   completion = gtk_entry_completion_new();

   if (completion)
    {
       ccompletion = _list_get_cobject(ClipMachineMemory, completion);
       if (!ccompletion)
	  ccompletion = _register_object(ClipMachineMemory, completion, GTK_TYPE_ENTRY_COMPLETION, cv, NULL);
       if (ccompletion)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &ccompletion->obj);
    }

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:26,代码来源:entrycompletion.c


示例11: clip_GTK_ENTRYCOMPLETIONGETMODEL

int
clip_GTK_ENTRYCOMPLETIONGETMODEL(ClipMachine * ClipMachineMemory)
{
   C_object *ccompletion = _fetch_co_arg(ClipMachineMemory);

   C_object *cmodell;

   GtkTreeModel *model;

   CHECKCOBJ(ccompletion, GTK_IS_ENTRY_COMPLETION(ccompletion->object));

   model = gtk_entry_completion_get_model(GTK_ENTRY_COMPLETION(ccompletion->object));

   if (model)
    {
       cmodell = _list_get_cobject(ClipMachineMemory, model);
       if (!cmodell)
	  cmodell = _register_object(ClipMachineMemory, model, GTK_TYPE_TREE_MODEL, NULL, NULL);
       if (cmodell)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cmodell->obj);
    }
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:25,代码来源:entrycompletion.c


示例12: clip_GTK_ENTRYCOMPLETIONGETENTRY

int
clip_GTK_ENTRYCOMPLETIONGETENTRY(ClipMachine * ClipMachineMemory)
{
   C_object *ccompletion = _fetch_co_arg(ClipMachineMemory);

   C_widget *cwid;

   GtkWidget *wid;

   CHECKCOBJ(ccompletion, GTK_IS_ENTRY_COMPLETION(ccompletion->object));

   wid = gtk_entry_completion_get_entry(GTK_ENTRY_COMPLETION(ccompletion->object));

   if (wid)
    {
       cwid = _list_get_cwidget(ClipMachineMemory, wid);
       if (!cwid)
	  cwid = _register_widget(ClipMachineMemory, wid, NULL);
       if (cwid)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cwid->obj);
    }

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:26,代码来源:entrycompletion.c


示例13: clip_GDK_REGIONUNIONWITHRECT

/* Returns the union of a region and a rectangle. */
int
clip_GDK_REGIONUNIONWITHRECT(ClipMachine * ClipMachineMemory)
{
   C_object *creg = _fetch_co_arg(ClipMachineMemory);

   ClipVar  *crect = _clip_spar(ClipMachineMemory, 2);

   C_object *cdest;

   GdkRectangle rect;

   CHECKCOBJ(creg, GDK_IS_REGION(creg->object));
   CHECKARG(2, MAP_type_of_ClipVarType);

   _map_get_gdk_rectangle(ClipMachineMemory, crect, &rect);
   gdk_region_union_with_rect(GDK_REGION(creg), &rect);

   if (creg)
    {
       cdest = _register_object(ClipMachineMemory, GDK_REGION(creg), GDK_TYPE_REGION, NULL, NULL);
       if (cdest)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cdest->obj);
    }

   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:29,代码来源:gdkregion.c


示例14: clip_GTK_NOTEBOOKGETNTHPAGE

/* Returns the content of the page number page_num, or
 * NULL if page_num is out of bounds. */
int
clip_GTK_NOTEBOOKGETNTHPAGE(ClipMachine * ClipMachineMemory)
{
   C_widget *cntb = _fetch_cw_arg(ClipMachineMemory);

   gint      page_num = _clip_parni(ClipMachineMemory, 2);

   C_widget *cwid;

   GtkWidget *wid;

   CHECKCWID(cntb, GTK_IS_NOTEBOOK);
   CHECKOPT(2, NUMERIC_type_of_ClipVarType);
   if (_clip_parinfo(ClipMachineMemory, 2) == UNDEF_type_of_ClipVarType)
      page_num = 1;
   wid = gtk_notebook_get_nth_page(GTK_NOTEBOOK(cntb->widget), page_num - 1);
   cwid = _list_get_cwidget(ClipMachineMemory, wid);
   if (!cwid)
      cwid = _register_widget(ClipMachineMemory, wid, NULL);
   if (cwid)
      _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cwid->obj);
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:27,代码来源:notebook.c


示例15: clip_GTK_FONTCOMBONEW

/**** FONT COMBO constructor ****/
int
clip_GTK_FONTCOMBONEW(ClipMachine * cm)
{
	ClipVar     * cv = _clip_spar (cm,1);
	GtkWidget *wid = NULL;
        C_widget *cwid, *cname_combo, *csize_combo, *cbold_btn, *citalic_btn;

	CHECKOPT(1,MAP_t);

	wid = gtk_font_combo_new();
        if (!wid) goto err;
	cwid = _register_widget(cm, wid, cv);
        cname_combo = _register_widget(cm, GTK_FONT_COMBO(wid)->name_combo, NULL);
        csize_combo = _register_widget(cm, GTK_FONT_COMBO(wid)->size_combo, NULL);
        cbold_btn   = _register_widget(cm, GTK_FONT_COMBO(wid)->bold_button, NULL);
        citalic_btn = _register_widget(cm, GTK_FONT_COMBO(wid)->italic_button, NULL);
        _clip_madd(cm, &cwid->obj, HASH_NAMECOMBO, &cname_combo->obj);
        _clip_madd(cm, &cwid->obj, HASH_SIZECOMBO, &csize_combo->obj);
        _clip_madd(cm, &cwid->obj, HASH_BOLDBUTTON, &cbold_btn->obj);
        _clip_madd(cm, &cwid->obj, HASH_ITALICBUTTON, &citalic_btn->obj);
        _clip_mclone(cm,RETPTR(cm),&cwid->obj);

	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:27,代码来源:fontcombo.c


示例16: clip_GTK_UIMANAGERGETACCELGROUP

int
clip_GTK_UIMANAGERGETACCELGROUP(ClipMachine * ClipMachineMemory)
{
   C_object *cmanager = _fetch_co_arg(ClipMachineMemory);

   GtkAccelGroup *agroup;

   C_widget *cagroup;

   CHECKARG2(1, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType);
   CHECKCOBJ(cmanager, GTK_IS_UI_MANAGER(cmanager->object));

   agroup = gtk_ui_manager_get_accel_group(GTK_UI_MANAGER(cmanager->object));

   if (agroup)
    {
       cagroup = _list_get_cwidget(ClipMachineMemory, agroup);
       if (!cagroup)
	  cagroup = _register_widget(ClipMachineMemory, GTK_WIDGET(agroup), NULL);
       if (cagroup)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cagroup->obj);
    }
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:26,代码来源:uimanager.c


示例17: clip_GTK_DRAGDESTFINDTARGET

int
clip_GTK_DRAGDESTFINDTARGET(ClipMachine * cm)
{
	C_widget     *cwid = _fetch_cw_arg(cm);
        C_object *ccontext = _fetch_cobject(cm, _clip_spar(cm, 2));
        C_object   *ctlist = _fetch_cobject(cm, _clip_spar(cm, 3));
        GdkAtom       atom ;
        C_object    *catom ;

	CHECKCWID(cwid, GTK_IS_WIDGET);
	if (!ccontext || ccontext->type != GDK_TYPE_DRAG_CONTEXT)
        	goto err;
	if (!ctlist || ctlist->type != GTK_TYPE_TARGET_LIST)
        		goto err;

        atom = gtk_drag_dest_find_target(GTK_WIDGET(cwid->widget),
        	(GdkDragContext*)ccontext->object,
        	(GtkTargetList*)ctlist->object);
	if (atom)
        {
        	catom = _list_get_cobject(cm, &atom);
        	if (!catom) catom = _register_object(cm, &atom, GDK_TYPE_ATOM, NULL, NULL);
                if (catom) _clip_mclone(cm, RETPTR(cm), &catom->obj);
        }

	return 0;
err:
	return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:29,代码来源:draganddrop.c


示例18: clip_GTK_UIMANAGERGETWIDGET

int
clip_GTK_UIMANAGERGETWIDGET(ClipMachine * ClipMachineMemory)
{
   C_object *cmanager = _fetch_co_arg(ClipMachineMemory);

   gchar    *path = _clip_parc(ClipMachineMemory, 2);

   GtkWidget *wid;

   C_widget *cwid;

   CHECKARG2(1, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType);
   CHECKCOBJ(cmanager, GTK_IS_UI_MANAGER(cmanager->object));
   CHECKARG(2, CHARACTER_type_of_ClipVarType);

   wid = gtk_ui_manager_get_widget(GTK_UI_MANAGER(cmanager->object), path);

   if (wid)
    {
       cwid = _list_get_cwidget(ClipMachineMemory, wid);
       if (!cwid)
	  cwid = _register_widget(ClipMachineMemory, wid, NULL);
       if (cwid)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cwid->obj);
    }
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:29,代码来源:uimanager.c


示例19: clip_GTK_BUTTONNEW

/**** BUTTON constructor ****/
int
clip_GTK_BUTTONNEW(ClipMachine * ClipMachineMemory)
{
    ClipVar  *cv = _clip_spar(ClipMachineMemory, 1);

    char     *title = _clip_parc(ClipMachineMemory, 2);

    char     *pchar = _clip_parc(ClipMachineMemory, 3);

    GtkWidget *wid = NULL, *label = NULL;

    C_widget *cwid, *clabel = NULL;

    guint     accel_key = 0;

    CHECKOPT(1, MAP_type_of_ClipVarType);
    CHECKOPT(2, CHARACTER_type_of_ClipVarType);
    CHECKOPT(3, CHARACTER_type_of_ClipVarType);

    if (pchar)
    {
        unsigned char *pc;

        for (pc = (unsigned char *) title; pc && *pc; pc++)
            if (*pc == *pchar)
            {
                *pc = '_';
                accel_key = *(pc + 1);
            }
    }
    if (_clip_parinfo(ClipMachineMemory, 2) == CHARACTER_type_of_ClipVarType)
    {
        LOCALE_TO_UTF(title);
        wid = gtk_button_new_with_label(title);
        label = GTK_BIN(&(GTK_BUTTON(wid)->bin))->child;
        if (pchar)
            accel_key = gtk_label_parse_uline(GTK_LABEL(label), title);
        FREE_TEXT(title);
    }
    else
    {
        wid = gtk_button_new();
    }
    if (!wid)
        goto err;

    cwid = _register_widget(ClipMachineMemory, wid, cv);

    if (label)
        clabel = _register_widget(ClipMachineMemory, label, NULL);
    if (clabel)
        _clip_madd(ClipMachineMemory, &cwid->obj, HASH_LABEL, &clabel->obj);

    _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cwid->obj);
    _clip_mputn(ClipMachineMemory, &cwid->obj, HASH_ACCELKEY, accel_key);

    return 0;
err:
    return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:61,代码来源:button.c


示例20: clip_GTK_UIMANAGERGETACTION

int
clip_GTK_UIMANAGERGETACTION(ClipMachine * ClipMachineMemory)
{
   C_object *cmanager = _fetch_co_arg(ClipMachineMemory);

   gchar    *path = _clip_parc(ClipMachineMemory, 2);

   GtkAction *action;

   C_object *caction;

   CHECKARG2(1, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType);
   CHECKCOBJ(cmanager, GTK_IS_UI_MANAGER(cmanager->object));
   CHECKARG(2, CHARACTER_type_of_ClipVarType);

   action = gtk_ui_manager_get_action(GTK_UI_MANAGER(cmanager->object), path);

   if (action)
    {
       caction = _list_get_cobject(ClipMachineMemory, action);
       if (!caction)
	  caction = _register_object(ClipMachineMemory, action, GTK_TYPE_ACTION, NULL, NULL);
       if (caction)
	  _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &caction->obj);
    }
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:29,代码来源:uimanager.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ RETURN函数代码示例发布时间:2022-05-30
下一篇:
C++ RETHROW函数代码示例发布时间: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