コード例 #1
0
ファイル: text.c プロジェクト: dylanahsmith/wine
static HRESULT WINAPI domtext_get_parentNode(
    IXMLDOMText *iface,
    IXMLDOMNode** parent )
{
    domtext *This = impl_from_IXMLDOMText( iface );

    TRACE("(%p)->(%p)\n", This, parent);

    return node_get_parent(&This->node, parent);
}
コード例 #2
0
ファイル: cdata.c プロジェクト: PatroxGaurab/wine
static HRESULT WINAPI domcdata_get_parentNode(
    IXMLDOMCDATASection *iface,
    IXMLDOMNode** parent )
{
    domcdata *This = impl_from_IXMLDOMCDATASection( iface );

    TRACE("(%p)->(%p)\n", This, parent);

    return node_get_parent(&This->node, parent);
}
コード例 #3
0
ファイル: pi.c プロジェクト: mikekap/wine
static HRESULT WINAPI dom_pi_get_parentNode(
    IXMLDOMProcessingInstruction *iface,
    IXMLDOMNode** parent )
{
    dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );

    TRACE("(%p)->(%p)\n", This, parent);

    return node_get_parent(&This->node, parent);
}
コード例 #4
0
static HRESULT WINAPI entityref_get_parentNode(
    IXMLDOMEntityReference *iface,
    IXMLDOMNode** parent )
{
    entityref *This = impl_from_IXMLDOMEntityReference( iface );

    TRACE("(%p)->(%p)\n", This, parent);

    return node_get_parent(&This->node, parent);
}
コード例 #5
0
ファイル: docfrag.c プロジェクト: Sunmonds/wine
static HRESULT WINAPI domfrag_get_parentNode(
    IXMLDOMDocumentFragment *iface,
    IXMLDOMNode** parent )
{
    domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );

    TRACE("(%p)->(%p)\n", This, parent);

    return node_get_parent(&This->node, parent);
}
コード例 #6
0
ファイル: debug-tree.c プロジェクト: thejan2009/sway
static int draw_node(cairo_t *cairo, struct sway_node *node,
		struct sway_node *focus, int x, int y) {
	int text_width, text_height;
	char *buffer = get_string(node);
	get_text_size(cairo, "monospace", &text_width, &text_height, NULL,
		1, false, buffer);
	cairo_save(cairo);
	cairo_rectangle(cairo, x + 2, y, text_width - 2, text_height);
	cairo_set_source_u32(cairo, 0xFFFFFFE0);
	cairo_fill(cairo);
	int height = text_height;
	list_t *children = get_children(node);
	if (children) {
		for (int i = 0; i < children->length; ++i) {
			// This is really dirty - the list contains specific structs but
			// we're casting them as nodes. This works because node is the first
			// item in each specific struct. This is acceptable because this is
			// debug code.
			struct sway_node *child = children->items[i];
			if (node_get_parent(child) == node) {
				cairo_set_source_u32(cairo, 0x000000FF);
			} else {
				cairo_set_source_u32(cairo, 0xFF0000FF);
			}
			height += draw_node(cairo, child, focus, x + 10, y + height);
		}
	}
	cairo_set_source_u32(cairo, 0xFFFFFFE0);
	cairo_rectangle(cairo, x, y, 2, height);
	cairo_fill(cairo);
	cairo_restore(cairo);
	cairo_move_to(cairo, x, y);
	if (focus == node) {
		cairo_set_source_u32(cairo, 0x0000FFFF);
	}
	pango_printf(cairo, "monospace", 1, false, buffer);
	free(buffer);
	return height;
}