Finding a way to learn GTK+ 3.x [duplicate] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am new to gtk and gnome programming and like to study GTK+ 3.0 and Gnome 3 programming. Since both of these are recent APIs, I can't find a good tutorial or blog post about these topics. The books I found on GTK+ or GNOME programming are very old ones. So I decided to start with the latest gtk tutorial at http://developer.gnome.org/gtk-tutorial/ which currently happened to be about GTK+ 2.90.7.
I need your help to find any tutorial or blogs or any book which cover GTK+ 3.0 or GNOME 3 programming topics. Would you please share any links that you know about these topics and thank you in advance.

Well, you need to start looking here. Second, what was said before is kinda right, there are books about Gtk+ 2.x and you could apply almost everything you learn to Gtk+ 3.x programming. I started by using Gtk+ 2.x and a few time later Gtk+ 3.x went out. I changed to the new version, migrated my old code, and that was how I learn to use Gtk+ 3.x, although have to say that is a process of always learning with Gtk/Glib based programming.
My recommendation: Learn Gtk+ 2.x there's some books, and some tutorials around. I remember this. And your other tool, main tool to is to read Gnome Project code, code from nautilus, gnome-control-center, gnome-utils, etc., almost everything basic you want to make your app do, there's already done by some Gnome module.

I've just seen this book came out: "GNOME 3 Application Development Beginner's Guide"
http://www.packtpub.com/gnome-3-application-development-beginners-guide/book

Check out the 10-minute tutorials on developer.gnome.org. They are designed for GTK 3.0. (Although really not much has changed in the basics between GTK 2 and 3.)

Gtk+ Tutorials & Resources
http://www.gtkforums.com/viewtopic.php?f=3&t=988&p=72088=GTK3+with+CSS#p72088
Scroll down to the links in gtkforums.com Index: Gtk+3.x with CSS
I suggest starting in: Intro and first program
http://www.gtkforums.com/viewtopic.php?f=3&t=988&p=72088=GTK3+with+CSS#p72088
Also under the section GTK+ Programming Tutorials "GUI Toolkit" you'll find:
Official GTK+3.x "Getting Started with GTK+"
http://developer.gnome.org/gtk3/stable/gtk-getting-started.html
Official GTK+3.x "Tutorials, code samples, and platform demos in C"
http://developer.gnome.org/gnome-devel-demos/3.5/c.html.en
Also: GNOME University Project
http://www.gtkforums.com/viewtopic.php?f=3&t=178162

Why don't you start with GTK+ 2.x ? I used GTK+ 2.x for my project and changed it to GTK3+ lately. Most changes are object fields which became private and now have to be accessed via methods. Another big change in GTK3+ is the depreacation of GdkGC. Instead of GdkGC you now have to use Cairo, but cairo is already available in GTK 2.x. In my opinion moving from GTK+ 2.x to GTK3+ at a latter stadium is not a big issue. And since GTK3+ is still pretty new it is not fully supported everywhere. I.e: the latest LTS Ubuntu is 10.10 which does not run GTK3+. Neither is the GTK3+ for Windows fully supported yet.

Related

Learning ExtJS4 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'd like to use ExtJS4 for my next project. However, I'm new to Ext and not that well versed in Javascript's finer points either.
There are a couple good books about ExtJS3 available. Should I learn from those old books first and then apply the knowledge to v4 or has the API changed so much that there is no point in learning the old one first?
If not, what's the best way to learn for an Ext newbie?
If you're wanting to learn ExtJS 4 right now then you're going to struggle for any good books on the subject because its only about 6 weeks since it was released.
There are great guides on the Sencha Website on how to migrate from ExtJS 3 -> 4 (this one for example) which might help you along the way if you choose to tackle 3 before 4.
In my honest opinion, the quickest way to learn ExtJS is to pick an example from the Sencha website and have a play around with it.
ExtJS 3 is a lot easier to learn than ExtJS 4 in my humble opinion. I've been using ExtJS for 3 years and thought that 4 was a big switch in thinking.
I finally completed a Tutorial series that demonstrates how to use the new MVC pattern and associations classes of ExtJS-4 with CouchDB by means of Peter Muller's software patch. The series includes an introductory write-up, several video screencasts, and some other resources. You can read all about it and view the screencasts here:
http://averydc.com/ee/index.php/blog/couchdb_extjs4_a_winning_combination
I probably made some mistakes and perhaps mis-spoke here and there, so please feel free to offer constructive criticism. You can post comments on my Blog post. My intention is to help both CouchDB users and/or ExtJS-4 users get a jump start with building an MVC client/server CRUD application using document databases as an alternative to relational databases.
Peter Muller created a software patch for ExtJS-4 and Sencha Touch that makes working with de-normalized databases much easier. I find it is a very maintainable solution for me. If Peter's software patch is something that will work for you, please request from Sencha devs that the patch be integrated into an official release of ExtJS-4 and Sencha Touch in the future. The thread is being watched by Ed Spencer, as he is curious to see the demand. To add your voice, get the patch, or report issues, please post a comment in Peter's thread here:
http://www.sencha.com/forum/showthread.php?127547-Sencha-Platform-denormalized-Data-patch&highlight=couch
Hope this fills a need... Thanks.
I'm also new to Ext and decided to start with Extjs 4 (However, we use extjs 2 in our projects at work!).
Last week I finally got the book Ext JS 4 First Look by Loiane Groner and took a look at it with the hope to find it a useful resource for learning extjs and get over it. But after a bit skimming through, I found out that the book is only suitable for switchers from Extjs3 to Extjs4 and is of no help to newcomers.
IMHO, learning with playing around with examples only gives you experience but you would gain no insight(But is the fastest way as Jaitsu indicated). In order to become an expert, you need to be an experienced develper with a great insight! So my suggestion is to learn extjs 3 from a book and then read Groner's book and begin playing around with the exercises simultaneously.
I bought the book directly from the Publisher: http://www.packtpub.com/ext-js-4-first-look/book
They even have an option of buying an e-book
Apart from ExtJS 4 first look https://www.packtpub.com/ext-js-4-first-look/book
there are couple of more books here:
ExJS in Action Second Edition covers ExJS 4.0
http://manning.com/garcia3/
http://www.packtpub.com/sencha-ext-js-4-web-application-development-cookbook/book
Book on extjs4 http://www.amazon.com/Ext-JS-4-First-Look/dp/1849516669/ref=sr_1_1?ie=UTF8&qid=1330388504&sr=8-1

Sencha Touch - looking for a good tutorial / getting started for a content application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm trying to build a mobile "content" application that will be used to display many pages of mostly text, using Sencha Touch (based on ExtJs). I'm familiar with JQuery & JQTouch; I've never used ExtJs before.
What's the best/fastest way to get started?
I started with the "icons" demo and was able to add a scroll property ('vertical') to have content be scrollable between the top and bottom tabs (that's actually what brought me to Sencha Touch: the ability to have "fixed" toolbars).
But now what? How do I update content?
In an ExtJs tutorial (here, near the bottom of the page) it says that one can act on an Element object to load content to an element; but that does not seem to be usable in the same way in the "icons" Sencha Touch demo.
Any help appreciated!
[Sencha person] I would recommend starting with the "Getting Started" guide that helps you write the GeoTweet sample application:
-- obsolete link deleted --
Update: since we released Touch 2.0 - you should start here:
http://docs.sencha.com/touch/2-1/ which has links to all the getting started materials
If you're coming from jQuery/jQTouch, you'll find that Sencha does things quite a bit differently. Essentially, with Sencha Touch you're writing an object-oriented javascript application that generates HTML markup (usually bound to variables/stores) vs. with jQTouch - creating HTML markup that then gets manipulated by javascript.
I would also look at some of the better mini-apps that we've seen in the wild so far to guide you.
-- link deleted --
Update: We now have a gallery of apps for you to see what people have been up to.
I myself am currently reading up on Sencha Touch, and found the following tutorials/articles:
Hello World: http://www.sencha.com/learn/Tutorial:Sencha_Touch_Hello_World
Getting Started: http://dev.sencha.com/deploy/touch/getting-started.html
MVC and PhoneGap: http://www.sencha.com/learn/Tutorial:A_Sencha_Touch_MVC_application_with_PhoneGap
MVC: http://myxaab.wordpress.com/2011/02/27/sencha-touch-mvc-application-part-2/
Data Package: http://www.sencha.com/blog/using-the-data-package-in-sencha-touch
Also, check out the examples packed within the framework and the Forums.
Finally check out this example.
update: found this one http://www.andreacammarata.com/en/corsi/sencha-touch/setup.html
Also, i read that a Sencha Touch book "in action" will be out by the summer...
This is quite good and easy to follow: Writing a Sencha Touch Application
I am also a sencha touch learner,I just get the toturial from sencha official website.
maybe you can hava a look this link:
http://www.sencha.com/learn/my-first-sencha-touch-experience
It is from sencha website.
Jesus Garcia and Anthony De Moss are working on the sencha-touch book called sencha-touch in action checkout the manning publication there are some few chapters available for free to take you through the setup and also the documentation for sench-touch-1.1.0 is detailed enough to you started
I was in your position a few weeks ago and found this video to be the MOST helpful out of all of them out there:
http://www.youtube.com/watch?v=5F7Gx0-W-M4&list=UU5VQSlJfHizgPCFxyx37pvg&index=6&feature=plcp
Since Sencha Touch's initial setup is a bit confusing, this guy- Rohit- really breaks it down and gets you started in no time. He even gets into pulling dynamic data from remote sources like the google maps API.
The absolute greatest tip you can take from this vid is how to use XAMPP and this terminal code (Mac) to view your project in the browser:
open -a safari --args --disable-web-security
If the security thing makes you uneasy, I've found that the webkit browser Omniweb http://www.omnigroup.com/products/omniweb/ loads projects without a problem
Once you are off with the hello world.. you can have a look at this awesome tutorial..
http://mobile.tutsplus.com/tutorials/mobile-web-apps/create-a-location-aware-site-with-sencha-touch-displaying-locations/
New hands-on tutorials for Sencha Touch, Ext JS 4, and Sencha Architect are now available at the following URL:
http://training.figleaf.com/tutorials/senchacomplete/

What are the IDEs available for gtk+ development [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Recently i start to studying C/gtk+ programming. And want to ask one question: what are the IDEs available for C/gtk+ development apart from command line interface?
Thank you.
In my (biased) opinion and experience, you're better off learning GTK by command-line compilation and your favorite editor (gedit, kate, vi, emacs, whatever). This way, you can learn at your own pace rather than trying to grapple with a big complicated IDE that really isn't beginner-friendly. Nonetheless, be aware of devhelp (GTK's development documentation program) and try building a couple GUIs with glade3 and using them in your C programs.
This might not be the answer you want, but I feel that C/C++ GUI IDEs tend to suck, at least for beginners.
Anjuta can do C/GTK+, but I personally wasn't very impressed with it. It asks you what plugin you want to open .glade files with, new projects are built with autoconf (resulting in a mess of over 70 files for a simple "Hello world") and localized with gettext by default (resulting in a bunch of boilerplate code in main.c), and it pops dialogs like this when you invoke weird edge cases such as double clicking a button you just created:
My impression of Anjuta from the perspective of a beginner was, as you can tell, highly negative. It shows a whole lot of advanced options, but doesn't let you do basic tasks without a lot of hassle. Anjuta is not alone. In general, I don't believe I've ever found a (mature) C/C++ IDE for any GUI toolkit that was easy for a beginner like me.
There's really nothing all that special about GTK+, it's a pretty standard C API and so any IDE that lets you program C is going to work well for GTK+. Examples include Eclipse and Code::Blocks.
You can also use Glade as RAD tool for developing GTK+ GUIs in a graphical way. Use of Glade is pretty much IDE-independent, though.
Personally I find that Eclipse CDT and Glade make a pretty good combination. Eclipse doesn't need you to use Autotools, etc. If you're under Debian/Ubuntu, I'd recommend manually installing Eclipse instead of using the repository version.
Eclipse or Anjuta IDE. I found Anjuta IDE comfortable.
NetBeans has a pretty good C/C++ suport and if you want a designer I'd second Glade. I personally prefer Emacs + Semantic + ECB for C development.

Cross Platform C library for GUI Apps? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
The community reviewed whether to reopen this question 8 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Free of charge, simple to learn/use, Cross Platform C library for GUI Apps? Am I looking for Qt?
Bonus question: Can I develop with the said library/toolkit on Mac then recompile on PC/Linux?
Super Bonus Question: Link to tutorial and/or download of said library.
The truth is that I'm in the process of catching up on the C family (coming from web development - XHTML/PHP/MySQL) to learn iPhone development.
I do understand that C is not C++ or ObjectiveC but I want to keep the learning curve as simple as possible. Not to get too off topic, but I am also on the lookout for good starter books and websites. I've found this so far.
I'm trying to kill many birds with one stone here. I don understand that there are platform specific extensions, but I will try to avoid those for porting purposes
The idea is that I want to write the code on one machine and just compile thrice. (Mac/Win/Linux) If Objective C will compile on Windows and Linux as well as OS X then that's good. If I must use C++, that's also fine.
If you are looking for a C++ library, then Qt basically does what you are looking for. If you want to stick to pure C, then Qt is not an option.
As a C framework you could use GTK+, it works on Linux, Windows and OS X.
Take a look at the IUP Toolkit. It is written largely in C, and is also easily bound to Lua.
To complete this post Allegro has to be here =)
http://www.talula.demon.co.uk/allegro/
Allegro Game Library, have many graphics functions and a basic GUI library
And an explicit gui (and very simple) Allegro based library
http://cgui.sourceforge.net/index.html
Both multi-platform
Another option is Tk, which is a GUI library written in C. It comes with Tcl, a scripting language also written in C. These were designed from the ground up to be embedded in C programs.
One that I have considered using was the EFL, as it's quite fast, simple, small, but powerful. I would recommend diving into Elementary, their simplest GUI toolkit, and then later on, once you get comfortable with it, move to EDJE, which is not as simple, but much more powerful.
Qt is a C++ library. Other cross platform libraries that you might consider are wxWidgets (C++), and GTK (C).
All three of the presented libraries are fully cross platform. You can also look at Tcl/Tk, but that's a toolkit :).
You tagged this question about qt, which is a tag I follow. However, you are also asking with regards to c programming.
If for some strange (or domain-enforced) reason you feel you must use C and not C++, then Qt is not for you. It was designed from the ground-up as a C++ library.
Yet I'd strongly suggest questioning why your project would need to be in C. There are many benefits to C++, and the idea that C performs intrinsically better is mostly a myth. For some hard data on that, check out Bjarne Stroustrup's Learning C++ as a New Language.
If you must stick to C then there's always GTK. The underlying API of GTK+ is C, but bindings also exist for C++ called GTKmm. I'm not a big fan of it from a design perspective, but historically powered the Gnome desktop (Ubuntu's default)...and Google chose it for their version of Chrome for Linux. So it has some cred and support there.
But do note that Ubuntu is choosing Qt5 to implement their next version of "Unity" in the desktop:
https://askubuntu.com/questions/281092/why-is-canonical-choosing-qt-over-gtk-for-unitys-next-generation
EDIT: You added:
If I must use C++, that's also fine.
"Must" is a strong word, but there is practically no comparison between C++/Qt vs. C/GTK. And the latter is becoming a thing of history.
Take a look at the Ecere SDK. It offers a cross-platform GUI toolkit, and gives you eC, an object-oriented language derived from C (with all of its functionality) that is just great for building GUIs.

Material to learn GObject and Glib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am comfortable with C. but need to learn GObject and Glib for gstreamer. All i found on net is Gobject reference manual. Its good but looking for tutorial for Gobject/Glib as the main focus is on gstreamer.
So pls share any other resources to learn the glib and gobject.
Start with Glib, its quite easy and well described here: Glib Reference Manual
GObject is mostly a lot of boilerplate code to achieve object orientation. Try out the "maman bar" examples found in the GObject Reference Manual
For me, GStreamer took the most time to understand. The documentation is good but there is alot to read (GStreamer docs). After reading about the basics, try starting a pipeline from the cmdline using gst-launch. Then read the full manual about application development and do some examples. Before trying to build your own plugin, check out some simple plugin and try understand the different parts, a simple place to start is the identity plugin
Good luck!
/Joel Larsson
You may be interested in these sample programs I uploaded to github after I read the chapter in the Gnome Developers Guide and went through the gobject manual.
There is also "the offical Gnome 2 Developer's guide". See 59 ff. on the mentioned book...
And it's really a good idea to check the sources of gtk. I've spend the last few weeks on getting into it, and found this book to be very helpful. What's quite tedious is to get the constuctors right and the order of initialization is "quite" mind-bending.
What you should check is chapter 4 in the GObject documentation also. It does not cover everything but together with the book it' quite ok. I suggest starting with a very simple derived glass form GObject....., to better understand on base principle
One always has two
structures. A Class Structure in which you store all the function pointers and an instance structure which represents one Object. This is the most important thing to get.
Another point which is a bit harder to understand it the reference counting for memory management. It helps if you had contact before with Objective-C and/or libapr and/or
COM.
Regards
Friedrich
This is best GTK+ book I found, it has a chapter on GLib, but reference manual is the best place to learn and the most up to date "book" you will find.
Manage C data using the GLib collections is a introduction of glib collection(links, hash tables, arrays, trees, queues, relations). Lots of examples are included. Good for beginners.
Maybe too much easy but there are the GNOME platform demos which you can get used to the idiomatics of GNOME and its libraries.

Resources