Re: how to obtain a control by MIME type of URI?



On Tue, 2002-12-24 at 06:32, Kang JeongHee wrote:
> Hi.
> 
> I'm interested in implementing HTML::OBJECT element;
> http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3
> is superset of HTML::IMG, HTML::APPLET, and HTML::EMBED, etc.
> 
> the first challenge of HTML::IMG has took upon of loading eog directly.
> but I got found 'loading a contol directly' is really bad idea;
> there's bunch of controls that dealing with image/* MIME types, for example.
> and for HTML::OBJECT, I cannot imagine how much kind of controls implemented and will be.
> (for almost of them has placed in GStreamer I believe.)
> 
> so I ought not to specify which control to use for a external resource.
> then, I have only known for a URI of the resource, e.g. http://localhost/test.jpg
> Does bonobo support this kind of way to getting proper control for a resource?
> I'm suspecting bonobo_moniker_client_new_from_name() is the one I'm searching for.
> I'm not sure.

  If it were a local file, I know this works:
  	bonobo_get_object("file:/tmp/test.jpg", "IDL:Bonobo/Control:1.0", NULL);

  However, for arbitrary URIs, maybe you need something like:
	bonobo_get_object("vfs:http://localhost/test.jpg";, "IDL:Bonobo/Control:1.0", NULL);
But I'm not sure in the second case, as this is undocumented AFAIK :(

  Alternatively, you can do a lower-level activation:
	bonobo_activation_activate(
"
bonobo:supported_mime_types.has ('image/*') AND repo_ids.has
('IDL:Bonobo/Control:1.0') AND repo_ids.has
('IDL:Bonobo/PersistStream:1.0')'
",
				    NULL, 0, &aid, NULL);

  Then, you have to create a Bonobo::Stream for the URI
("http://localhost/test.jpg";), query the PersistStream interface of the
control and load from the stream. This is exactly what
bonobo_get_object("file:/tmp/test.jpg", "IDL:Bonobo/Control:1.0", NULL);
does for file: URIs.

  I hope it helps. It's a bit incomplete information, but it's all I know.

> 
> help me pliz.
> thx.
> _______________________________________________
> gnome-components-list mailing list
> gnome-components-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-components-list
-- 
Gustavo Joćo Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]