當前位置: 首頁>>代碼示例>>C++>>正文


C++ CHECKCOBJ函數代碼示例

本文整理匯總了C++中CHECKCOBJ函數的典型用法代碼示例。如果您正苦於以下問題:C++ CHECKCOBJ函數的具體用法?C++ CHECKCOBJ怎麽用?C++ CHECKCOBJ使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CHECKCOBJ函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: clip_GTK_ENTRYCOMPLETIONGETMINIMUMKEYLENGTH

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

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

   _clip_parni(ClipMachineMemory, gtk_entry_completion_get_minimum_key_length(GTK_ENTRY_COMPLETION(ccompletion->object)));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:entrycompletion.c

示例2: clip_GDK_REGIONEMPTY

/* Returns TRUE if the GdkRegion is empty. */
int
clip_GDK_REGIONEMPTY(ClipMachine * ClipMachineMemory)
{
   C_object *creg = _fetch_co_arg(ClipMachineMemory);

   CHECKCOBJ(creg, GDK_IS_REGION(creg->object));

   _clip_retl(ClipMachineMemory, gdk_region_empty(GDK_REGION(creg)));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:14,代碼來源:gdkregion.c

示例3: clip_GTK_ENTRYCOMPLETIONINSERTPREFIX

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

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

   gtk_entry_completion_insert_prefix(GTK_ENTRY_COMPLETION(ccompletion->object));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:entrycompletion.c

示例4: clip_GTK_FILEFILTERGETNEEDED

int
clip_GTK_FILEFILTERGETNEEDED(ClipMachine * cm)
{
        C_object  *cfilter = _fetch_co_arg(cm);

	CHECKCOBJ(cfilter, GTK_IS_FILE_FILTER(cfilter->object));

	_clip_retni(cm, (int)gtk_file_filter_get_needed(GTK_FILE_FILTER(cfilter->object)));

	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:13,代碼來源:filefilter.c

示例5: clip_GDK_REGIONDESTROY

/* Destroys a GdkRegion. */
int
clip_GDK_REGIONDESTROY(ClipMachine * ClipMachineMemory)
{
   C_object *creg = _fetch_co_arg(ClipMachineMemory);

   CHECKCOBJ(creg, GDK_IS_REGION(creg->object));

   gdk_region_destroy(GDK_REGION(creg));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:14,代碼來源:gdkregion.c

示例6: clip_GTK_TREESELECTIONCOUNTSELECTEDROWS

int
clip_GTK_TREESELECTIONCOUNTSELECTEDROWS(ClipMachine * cm)
{
	C_object *ctreesel = _fetch_co_arg(cm);

	CHECKOPT2(1, MAP_t, NUMERIC_t); CHECKCOBJ(ctreesel,GTK_IS_TREE_SELECTION(ctreesel->object));

	_clip_retni(cm, gtk_tree_selection_count_selected_rows(GTK_TREE_SELECTION(ctreesel->object)));

	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:13,代碼來源:treeselection.c

示例7: clip_GTK_FILEFILTERADDPIXBUFFORMATS

int
clip_GTK_FILEFILTERADDPIXBUFFORMATS(ClipMachine * cm)
{
        C_object  *cfilter = _fetch_co_arg(cm);

	CHECKCOBJ(cfilter, GTK_IS_FILE_FILTER(cfilter->object));

	gtk_file_filter_add_pixbuf_formats(GTK_FILE_FILTER(cfilter->object));

	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:13,代碼來源:filefilter.c

示例8: clip_GTK_ICONTHEMERESCANIFNEEDED

int
clip_GTK_ICONTHEMERESCANIFNEEDED(ClipMachine * cm)
{
        C_object *cicon   = _fetch_co_arg(cm);

	CHECKCOBJ(cicon, GTK_IS_ICON_THEME(cicon->object));

	_clip_retl(cm, gtk_icon_theme_rescan_if_needed(GTK_ICON_THEME(cicon->object)));

	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:13,代碼來源:icontheme.c

示例9: clip_GDK_GCSETFOREGROUND

/* Sets the foreground color for a graphics context. */
int
clip_GDK_GCSETFOREGROUND(ClipMachine * cm)
{
	C_object      *cgc = _fetch_co_arg(cm);
	ClipVar    *mcolor = _clip_spar  ( cm, 2);
	GdkColor color;
	CHECKCOBJ(cgc,GDK_IS_GC(cgc)); CHECKARG(2,MAP_t);
	_map_colors_to_gdk(cm, mcolor, &color);
	gdk_gc_set_foreground(GDK_GC(cgc->object), &color);
	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:14,代碼來源:gdkgc.c

示例10: clip_GTK_DRAGSOURCESETICON

int
clip_GTK_DRAGSOURCESETICON(ClipMachine * cm)
{
        C_widget      *cwid = _fetch_cw_arg(cm);
	C_object *ccolormap = _fetch_cobject(cm, _clip_spar(cm, 2));
        C_object   *cpixmap = _fetch_cobject(cm, _clip_spar(cm, 3));
        C_object     *cmask = _fetch_cobject(cm, _clip_spar(cm, 4));

	CHECKCWID(cwid, GTK_IS_WIDGET);
	CHECKCOBJ(ccolormap, GDK_IS_COLORMAP(ccolormap->object));
	CHECKCOBJ(cpixmap, GDK_IS_PIXMAP(cpixmap->object));
	CHECKCOBJ(cmask, GDK_IS_BITMAP(cmask));

        gtk_drag_source_set_icon(GTK_WIDGET(cwid->widget),
        	GDK_COLORMAP(ccolormap->object),
                GDK_PIXMAP(cpixmap->object),
                GDK_BITMAP(cmask->object));

	return 0;
err:
	return 1;
}
開發者ID:amery,項目名稱:clip-itk,代碼行數:22,代碼來源:draganddrop.c

示例11: clip_GTK_FILECHOOSERGETACTION

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

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

   _clip_retni(ClipMachineMemory, (int) gtk_file_chooser_get_action(GTK_FILE_CHOOSER(cchooser->object)));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:filechooser.c

示例12: clip_GTK_FILECHOOSERGETLOCALONLY

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

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

   _clip_retl(ClipMachineMemory, gtk_file_chooser_get_local_only(GTK_FILE_CHOOSER(cchooser->object)));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:filechooser.c

示例13: clip_GTK_ENTRYCOMPLETIONCOMPLETE

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

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

   gtk_entry_completion_complete(GTK_ENTRY_COMPLETION(ccompletion->object));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:entrycompletion.c

示例14: clip_GTK_ENTRYCOMPLETIONGETPOPUPCOMPLETION

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

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

   _clip_retl(ClipMachineMemory, gtk_entry_completion_get_popup_completion(GTK_ENTRY_COMPLETION(ccompletion->object)));

   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:13,代碼來源:entrycompletion.c

示例15: clip_GDK_DRAWTEXT

/* Draws a number of characters in the given font or fontset. */
int
clip_GDK_DRAWTEXT(ClipMachine * ClipMachineMemory)
{
   C_widget *cwid = _fetch_cw_arg(ClipMachineMemory);

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

   C_object *font = _fetch_cobject(ClipMachineMemory, _clip_spar(ClipMachineMemory, 3));

   gint      x = _clip_parni(ClipMachineMemory, 4);

   gint      y = _clip_parni(ClipMachineMemory, 5);

   gchar    *text = _clip_parc(ClipMachineMemory, 6);

   gint      length = _clip_parni(ClipMachineMemory, 7);

   GdkDrawable *drw = NULL;

   CHECKCWID(cwid, GTK_IS_WIDGET);
   CHECKOPT2(2, NUMERIC_type_of_ClipVarType, MAP_type_of_ClipVarType);
   CHECKCOBJ(cgc, GDK_IS_GC(cgc));
   CHECKOPT2(3, NUMERIC_type_of_ClipVarType, MAP_type_of_ClipVarType);
   CHECKCOBJ(cgc, GDK_IS_FONT(font));
   CHECKOPT(4, NUMERIC_type_of_ClipVarType);
   CHECKOPT(5, NUMERIC_type_of_ClipVarType);
   CHECKOPT(6, CHARACTER_type_of_ClipVarType);
   CHECKOPT(7, NUMERIC_type_of_ClipVarType);
   drw = cwid->widget->window;
   if (GTK_IS_PIXMAP(cwid->widget))
      drw = GTK_PIXMAP(cwid->widget)->pixmap;
   LOCALE_TO_UTF(text);
   gdk_draw_text(drw, GDK_FONT(font->object), GDK_GC(cgc->object), x, y, text, length);
   FREE_TEXT(text);
   return 0;
 err:
   return 1;
}
開發者ID:amery,項目名稱:clip-angelo,代碼行數:39,代碼來源:gdkdraw.c


注:本文中的CHECKCOBJ函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。