Find the answer to your Linux question:
Results 1 to 8 of 8
Does Glade IDE include any tools to easily create child threads using GLib? If so please give me links to docs and tutorials. Otherwise tell me where can I add ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66

    GLib multithreading framework and and Glade


    Does Glade IDE include any tools to easily create child threads using GLib? If so please give me links to docs and tutorials. Otherwise tell me where can I add them to thr code to not confuse Glide.
    Last edited by muxec; 03-28-2006 at 11:50 AM. Reason: Fix Glide->Glade

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Well, I don't know Glide (I used gIDE some time ago...) but I think is difficult to create a plugin to add threads.... what are you thinking? I use Anjuta (it is a really nice and powerful IDE) and it hasn't anything similar.

    The way to achieve this is creating threads by hand with g_thread_create() and blocking threads (with gdk_threads_enter() and gdk_threads_leave() ) to perform mutual exclusion.

    For further info: developer.gnome.org

    Best regards!

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66
    Any good GLib guides except from official?
    And what about onTimer events in GLib? (if any)
    Sorry, I mean Glade GUI, not Glide
    Last edited by muxec; 03-28-2006 at 11:50 AM. Reason: P.S.

  4. #4
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Well, Glade... No, I'm sure it doesn't provide a mechanism to add threads. Glade is only a GUI constructor, not an IDE.

    About timers: you can use g_timer to keep track of time elapsed.

    The best documentation available that I know is the official one.

    And for last: If you want events like in MS .NET you should add callbacks to your widgets (buttons, windows, boxes, etc...)

    Best regards!

  5. #5
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66

    Talking One more question

    Thanks, I see Glade is like Borland Delphi but not for windows and not pascal.

    Now trying to figure our whether it's needed to call lookup_widget everutime you need it instead of storing pointers as global variables. (Yes, it's not good style, but it's my habbit).

    My program is half-done. My tutorial on creating physical simulation visualizations with Glade will be written than. It will be for very beginners. Sadly official G* documentation is not as good as Qt4.1 docs.

  6. #6
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401

    Wink

    Ehm... When I've understood the implementation of lookup widget I've started to write manually all my GUIs!!!

    I suppose to write better GUIs manually than using Glade... without too much effort... consider to control every aspect of the widgets without depending on the Glade wizards...
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

  7. #7
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66
    Than explain me how lookup widget works.

  8. #8
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401
    Basically GTK widgets are arranged in a tree. A parent object (container) have a certain number of child widgets. Having a widget pointer you'll be able to query alll widgets (even the father).

    It's possible to assign a name to each widget (wich do glade). So the lookup_widget routine will compare the widget name (passed as parameter) with the widgets reachable using the tree structure. When loopup_widget find a widgets "named" as specified, returns it's pointer, otherwise it returns NULL.

    How it works ESACTLY... you can read the code.

    I don't use it because I like to have pointers directly, without using GTK interface (or glade interface). I can do this storing interested widget pointers in a unique and global structure with describe the GUI state. Every routin wich needs to iteract with GUI can use this structure ti query or alter widget state.

    I don't know if there is some slowdown caused by using lookup_widget routine on complex GUIs, but my way follow my philosofy...
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •