clutter- image files not being displayed on clutter stage.



Hello, 

New at programming with clutter and trying to port some code from gtk2
code to gtk3 as well as update code to clutter-1.12.2.

The code fails to load some default images in the initial gui setup and
I cannot find the reason with my limited experience, so I thought I ask
the question here for some clarity of the issue. I have included the
code sections in attached files below, from several source files. The
error code handling has been removed for better clarity.

Only the clock widget is shown on the stage all other images from files
are not shown even if they are enabled by clutter_actor_show.

I have done some testing with loading one image file to the clutter
stage and it works when code included in a test main.c program, but does
not seem to work when coded as per below. i.e. the GTKwidget pointer
returned to the main.c code.

I have looked at several clutter and gtk tutorials on the web and
gtk3-demo programs etc but most clutter tutorials are out of date in the
clutter example's and use deprecated API functions and therefore do not
provide the information required by a beginner with limited knowledge. 

The reference manual's are great for the API but only when you have the
programming experience to understand the content correctly. Sometime a
phase or word is used that is not clarified in its meaning and can be
used incorrectly due to the understanding or interpretation of the
beginner. 

For example,
If several clutter actor's are added to a clutter stage, are they all
separate children of the clutter stage OR is the first actor added a
child only and all others added after the first actor are siblings of
that child. 

This may seem very basic to many, but when porting code from an earlier
version of clutter the functions based around re-parenting, adding
actor's, removing actors, etc usually only required one known argument,
the (actor) itself but in later clutter version's usually require two or
more arguments actor's, parent, self, child, sibling etc, so the correct
understanding of the relationship must be understood to be able to port
the code.

None of the above is critical of, or to any people, who have altered the
API, or made available documentation or to any code programmers in any
way, its just a view from a beginner, porting older code to a later
clutter and gtk3 versions and getting over the hurdles and holes.

The original source code is from sbmanager at this internet address:
http://cgit.sukimashita.com/sbmanager.git/

Hoping that someone will provide some clarification of the problem.

Cheers

- Tim

Attachment: clutter-code.c
Description: Text Data



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