Tizen Linux for mobile tablet smartphone will takeover the world. Backed by Intel, Samsung, Linux foundation. Good luck.
- Android is less important in such case
- IPhone also
Categories: Ajax, Android, Apache, C, cakePHP, centOS, Cisco, CSS, Fedora 12, Flash, FreeBSD, HTML, IE, Java, JavaScript, Juniper, Lua, MySQL, Oracle, PHP, Solaris, SRX210, Ubuntu, Unix/Linux, VB, Voip, Zend
Tags: android, intel, iphone, samsung
Ubuntu is now running on top of Android. Soon there will be no more NDK/SDK requirement. Android made a mess mistake for GCC developers. Everything in past need to use NDK/SDK to retype every single lines to JNA code, which is idiot implementation actually of Android.
- Android Ubuntu will then allow GCC
- Tizen linux from Intel, Samsung will soon release there dragon Linux with GCC support to take-over Android, IPhone
Categories: Android, C, cakePHP, centOS, Fedora 12, FreeBSD, Java, PHP, Solaris, Ubuntu, Unix/Linux, Zend
Todo:
TuxPhone can be patched with Linux ARM kernel. Let me know if i should write some!
TODO:
Back to the past, it was like floppy disk where i wrote simple C/Pascal application to show my professor my project works. Now in modern generation, everything is like kick it and start it.
So, all we need is a collection of boot process to operating process bridge. That is done and doable with OpenSource operating systems out there.
Now to build your one, there is none because all the License terms and condition protect them to be copied and re-distribute
If it is interesting topic vote for it, for next episode.
Start with very basic example:
Part 1: main.c
#include <gtk/gtk.h>
void on_window1_destroy (GtkObject *object, gpointer user_data)
{
gtk_main_quit();
}
void on_button2_clicked (GtkButton *button,gpointer user_data)
{
gtk_main_quit();
}
void on_button1_clicked (GtkButton *button,gpointer user_data)
{
printf(“Hello”);
}
int main( int argc,
char **argv )
{
GtkBuilder *builder;
GtkWidget *window;
GError *error = NULL;
/* Init GTK+ */
gtk_init( &argc, &argv );
/* Create new GtkBuilder object */
builder = gtk_builder_new();
/* Load UI from file. If error occurs, report it and quit application.
* Replace “tut.glade” with your saved project. */
if( ! gtk_builder_add_from_file( builder, “window.glade”, &error ) )
{
g_warning( “%s”, error->message );
g_free( error );
return( 1 );
}
/* Get main window pointer from UI */
window = GTK_WIDGET( gtk_builder_get_object( builder, “window1″ ) );
/* Connect signals */
gtk_builder_connect_signals( builder, NULL );
/* Destroy builder, since we don’t need it anymore */
g_object_unref( G_OBJECT( builder ) );
/* Show window. All other widgets are automatically shown by GtkBuilder */
gtk_widget_show( window );
/* Start main loop */
gtk_main();
return( 0 );
}
Part 2: prepared by Glade 3
<?xml version=”1.0″?>
<interface>
<requires lib=”gtk+” version=”2.14″/>
<!– interface-naming-policy project-wide –>
<object id=”window1″>
<signal name=”destroy” handler=”on_window1_destroy”/>
<child>
<object id=”vbox1″>
<property name=”visible”>True</property>
<property name=”orientation”>vertical</property>
<child>
<object id=”hbox1″>
<property name=”visible”>True</property>
<child>
<object id=”label1″>
<property name=”visible”>True</property>
<property name=”label” translatable=”yes”>label</property>
</object>
<packing>
<property name=”position”>0</property>
</packing>
</child>
<child>
<object id=”entry1″>
<property name=”visible”>True</property>
<property name=”can_focus”>True</property>
<property name=”invisible_char”>●</property>
</object>
<packing>
<property name=”position”>1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name=”position”>0</property>
</packing>
</child>
<child>
<object id=”button2″>
<property name=”label” translatable=”yes”>button</property>
<property name=”visible”>True</property>
<property name=”can_focus”>True</property>
<property name=”receives_default”>True</property>
</object>
<packing>
<property name=”position”>1</property>
</packing>
</child>
<child>
<object id=”button1″>
<property name=”label” translatable=”yes”>button</property>
<property name=”visible”>True</property>
<property name=”can_focus”>True</property>
<property name=”receives_default”>True</property>
<signal name=”clicked” handler=”on_button1_clicked”/>
</object>
<packing>
<property name=”position”>2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
Part 3: compiled as gcc main.c -o main -Wall `pkg-config –cflags –libs gtk+-2.0 gmodule-2.0`
#include <gst/gst.h>
#include <stdio.h>
int main (int argc, char *argv[])
{
/* Always initialize stuff. You’re never sure what value will the variable
* take! */
gchar *nano_str = NULL; /* No longer const otherwise you won’t be able to
* modify it. */
guint major = 0;
guint minor = 0;
guint micro = 0;
guint nano = 0;
gst_init (&argc, &argv);
gst_version (&major, &minor, µ, &nano);
if (nano == 1)
nano_str = “(CVS)”;
else if (nano == 2)
nano_str = “(Prerelease)”;
else
nano_str = “”;
printf (“This program is linked against GStreamer %d.%d.%d %s\n”,
major, minor, micro, nano_str);
return 0;
}
[root@example CppApplication_1]# gcc main.c -o main -Wall `pkg-config –cflags –libs gstreamer-0.10`
[root@example CppApplication_1]# ls
build dist main main.c Makefile nbproject
[root@example CppApplication_1]# ./main
This program is linked against GStreamer 0.10.29
[root@example CppApplication_1]#
Option 2:
[sun@example ~]$ cd /tmp
[sun@example tmp]$ gst-launch pulsesrc ! filesink location=dump.rawSetting pipeline to PAUSED …Pipeline is live and does not need PREROLL …Setting pipeline to PLAYING …New clock: GstAudioSrcClock
^CCaught interrupt — handling interrupt.Interrupt: Stopping pipeline …Execution ended after 40181185781 ns.Setting pipeline to PAUSED …Setting pipeline to READY …Setting pipeline to NULL …Freeing pipeline …
[sun@example tmp]$ gst-launch pulsesrc ! audioconvert ! vorbissenc ! oggmux ! filesink location=dump.ogg
WARNING: erroneous pipeline: no element “vorbissenc”
[sun@example tmp]$ gst-launch pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=dump.oggSetting pipeline to PAUSED …Pipeline is live and does not need PREROLL …Setting pipeline to PLAYING …New clock: GstAudioSrcClock
^CCaught interrupt — handling interrupt.Interrupt: Stopping pipeline …Execution ended after 23210724917 ns.Setting pipeline to PAUSED …Setting pipeline to READY …Setting pipeline to NULL …Freeing pipeline …
[sun@example tmp]$
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SKYPE4COMLib;
namespace SkypeBing
{
public partial class Form1 : Form
{
private Skype skype;
private const string trigger = "!"; // say help
private const string nick = "BOT";
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
skype = new Skype();
// use skype protocol 7
skype.Attach(7, false);
// listen
skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(skype_MessageStatus);
}
void skype_MessageStatus(ChatMessage pMessage, TChatMessageStatus Status)
{
// proceed only if the incoming message is a trigger
if (pMessage.Body.IndexOf(trigger) == 0)
{
// remove trigger string and make lower case
string command = pMessage.Body.Remove(0, trigger.Length).ToLower();
// send processed message back to skype chat window
skype.SendMessage(pMessage.Sender.Handle, nick +
" Says: " + ProcessCommand(command));
}
}
private string ProcessCommand(string str)
{
string result;
switch (str)
{
case "hello":
result = "Hello!";
break;
case "help":
result = "Sorry no help";
break;
default:
result = "default....";
break;
}
return result;
}
}
}
Tips for c++:
1. Text mode Unix gui framework
- http://www.gnu.org/software/ncurses/ncurses.html
2. X mode gui framework
- QT
- wxWidgets
- Glade
3. MVC
class CEntity {
int pitch; int roll; int yaw;
}
class Scene {
void Render(){
renderer.View(Math::Utills::MatrixView(camera.yaw, camera.roll, camera.pitch);
}
}
class CController {
/*some lua maybe in here e.g. cameraEnt.pitch += 0.0001f */
}
* Get Centos 5.4
* QT get it for c++: http://qt.nokia.com/downloads
1. Install the .bin
[root@www Desktop]# chmod a+x qt-sdk-linux-x86-opensource-2010.02.bin
[root@www Desktop]# ./qt-sdk-linux-x86-opensource-2010.02.bin
Read more…
Happy “C” ing
How can i make on linux/mac/windows/unix a basic C code and a basic Gui, fastest and easiest way?
- we will follow 16 steps
1. Open glade2 (not glade3 in centOS i dont have it)

Read more…