Hi
        May be the following is also a way to strip the foot print.
Instead of glibc, use dietlibc, it will reduce a lot of foot print. I
don't know you are working on embedded devices. Even it is very easy to
use also.


http://www.fefe.de/dietlibc/



With regds,

Shyjumon N 
TTEC
Tel: +91-80-4180-3500 Extn. 3273 
Mobile: +91-9945006965

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, January 24, 2007 6:24 PM
To: gtk-app-devel-list@gnome.org
Subject: gtk-app-devel-list Digest, Vol 33, Issue 36

Send gtk-app-devel-list mailing list submissions to
        gtk-app-devel-list@gnome.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-app-devel-list digest..."


Today's Topics:

   1. capture window for printing (Fabian F?rg)
   2. combobox question (Clint Barlow)
   3. gtk_print_operation_run warnings (Micah Carrick)
   4. Reducing GTK+ footprint ([EMAIL PROTECTED])
   5. RE: Reducing GTK+ footprint (Madhusudan E)
   6. Re: Reducing GTK+ footprint (Attilio Fiandrotti)
   7. RE: Reducing GTK+ footprint ([EMAIL PROTECTED])
   8. Re: Reducing GTK+ footprint (Tor Lillqvist)
   9. Help ( Regarding  Tailoring of GTK+ ) (Tor Lillqvist)


----------------------------------------------------------------------

Message: 1
Date: Tue, 23 Jan 2007 19:40:29 +0100
From: Fabian F?rg <[EMAIL PROTECTED]>
Subject: capture window for printing
To: gtk-app-devel-list@gnome.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

as the topic suggests, I am trying to capture a window which should be 
printed afterwards.

This is my code:

/* appl_t is a struct created by me which contains "GtkWidget
*print_win",
 * the window I want to print. Moreover, appl_t contains gints for the
 * width and height of the window */

/* callback for my print button */
static void print_cb(appl_t * appl)
{
    values_t *val = &appl->values;
    GtkPrintOperation *op;
    GtkPrintOperationResult res;

    output_print(appl); /* This function creates the window which I want

to print */

    op = gtk_print_operation_new();

    gtk_print_operation_set_n_pages(op, 1);
    gtk_print_operation_set_unit(op, GTK_UNIT_MM);
    g_signal_connect(op, "draw_page", G_CALLBACK(draw_page), appl);
    res =
        gtk_print_operation_run(op,
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
                    NULL, NULL);
    }
}

static void draw_page(GtkPrintOperation * operation,
              GtkPrintContext * print_context, gint page_nr,
              appl_t * appl)
{
    gdouble print_width, print_height, scale;
    cairo_t *cr, *cr_win;
    cairo_surface_t *surface;
    values_t *val = &appl->values;

    /* create a surface of the print window */
    cr_win = gdk_cairo_create(appl->print_win->window);

    /* get width and height of the print window */
    gdk_drawable_get_size(appl->print_win->window, &(val->width), 
&(val->height));

    gtk_widget_hide_all(appl->print_win);

    /* create the cairo surface for cr_win */
    surface = cairo_get_target(cr_win);
    cairo_surface_reference(surface);
    cairo_destroy(cr_win);

    /* get width and heigth of print_context */
    print_width = gtk_print_context_get_width(print_context);
    print_height = gtk_print_context_get_height(print_context);

    /* transform the print_context into a cairo_context */
    cr = gtk_print_context_get_cairo_context(print_context);

    scale = (gdouble) print_width / val->width;

    /* scale, keep aspect ratio */
    cairo_scale(cr, scale, scale);

    cairo_set_source_surface(cr, surface, 0., 0.);
    cairo_surface_destroy(surface);

    cairo_paint(cr);
}

The problem is that the window is often captured with the print dialog.
Furthermore, the window is sometimes "incomplete". The PDF/PS output 
shows just parts of the window - it seems that print_win is captured 
before it is completely rendered.

Questions:
- Are there any better ways to achieve what I want?
- Can I capture the window without showing it?

Regards,
Fabian


------------------------------

Message: 2
Date: Tue, 23 Jan 2007 16:01:32 -0600
From: "Clint Barlow" <[EMAIL PROTECTED]>
Subject: combobox question
To: gtk-app-devel-list@gnome.org
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi everyone,
I have a combobox that I am creating with gtk_combo_box_new_text().  Is
there a way to change the background color to something other than gray?

Thanks-
Clint


------------------------------

Message: 3
Date: Tue, 23 Jan 2007 20:52:16 -0800
From: Micah Carrick <[EMAIL PROTECTED]>
Subject: gtk_print_operation_run warnings
To: gtk-app-devel-list <gtk-app-devel-list@gnome.org>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Can anybody help me with the following errors?

** (printing:10547): WARNING **: Error getting printer list: Too many 
failed attempts

** (printing:10547): WARNING **: Error result: Too many failed attempts

These 2 warning are output whenever the print dialog recieves a mouse 
click on any widget in the window. The dialog returns 
GTK_PRINT_OPERATION_RESULT_APPLY and the print operation is a success, 
but still those warnings have me curious. I do not have a printer 
installed but am using the "Print to file" printer.

Dialog was run using:

res = gtk_print_operation_run (operation, 
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, 
                                 GTK_WINDOW (w->window), &error);


-- 
- Micah Carrick
  Developer - http://www.micahcarrick.com | http://www.gtkforums.com
  



------------------------------

Message: 4
Date: Wed, 24 Jan 2007 16:47:48 +0530
From: <[EMAIL PROTECTED]>
Subject: Reducing GTK+ footprint
To: <gtk-app-devel-list@gnome.org>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Greetings, 

 

Can any one tell me or give me some links to know how I can reduce the
footprint of GTK. 

 

Actually I want to remove some widgets (like frame, color selection,
file selection etc) which I am not using in my application. 

 

Also I want to know that if there is any other alternate way to reduce
the GTK footprint.

 

Regards,

 

Richa

 


------------------------------

Message: 5
Date: Wed, 24 Jan 2007 16:56:09 +0530
From: Madhusudan E <[EMAIL PROTECTED]>
Subject: RE: Reducing GTK+ footprint
To: [EMAIL PROTECTED], gtk-app-devel-list@gnome.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

Hi, 
I am not sure, to what level you want to strip the GTK Widgets and also
the
purpose behind it.
To port GTK over Mobile phones LiPS forum is trying to strip the
unwanted
widgets by applying a Patch to GTK.
Maybe you can apply LiPS patch to get rid of most of the unwanted and
redundant widget. 
There is another work around. Just set flags on these widgets in
Makefile
and also on Gtk Code wherever required.
My advice, Follow LiPS patch.

Hope, this helps in some way

Rgds,
Madhu



 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, January 24, 2007 4:48 PM
To: gtk-app-devel-list@gnome.org
Subject: Reducing GTK+ footprint

Greetings, 

 

Can any one tell me or give me some links to know how I can reduce the
footprint of GTK. 

 

Actually I want to remove some widgets (like frame, color selection,
file selection etc) which I am not using in my application. 

 

Also I want to know that if there is any other alternate way to reduce
the GTK footprint.

 

Regards,

 

Richa

 





------------------------------

Message: 6
Date: Wed, 24 Jan 2007 12:38:38 +0100
From: Attilio Fiandrotti <[EMAIL PROTECTED]>
Subject: Re: Reducing GTK+ footprint
To: gtk-app-devel-list@gnome.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii; format=flowed

[EMAIL PROTECTED] wrote:
> Greetings, 
> 
>  
> 
> Can any one tell me or give me some links to know how I can reduce the
> footprint of GTK. 
> 
>  
> 
> Actually I want to remove some widgets (like frame, color selection,
> file selection etc) which I am not using in my application. 
> 
>  
> 
> Also I want to know that if there is any other alternate way to reduce
> the GTK footprint.

not sure if this is what you mean, but in the debian-installer (hich is 
gtk/dfb based) we provide a set of stripped libraries using the mklibs
tool.
This allows us to save up vakuable space on installation media.

regards

Attilio


------------------------------

Message: 7
Date: Wed, 24 Jan 2007 17:45:24 +0530
From: <[EMAIL PROTECTED]>
Subject: RE: Reducing GTK+ footprint
To: <[EMAIL PROTECTED]>
Cc: gtk-app-devel-list@gnome.org
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="us-ascii"

Hi...

Ya even our requirement is to save the space on installation media.

Can't we get a copy of mklibs tool for FC5 / FC6 as we cant use that
debian-installer.

Regards,

Richa



-----Original Message-----
From: Attilio Fiandrotti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 5:09 PM
To: gtk-app-devel-list@gnome.org
Cc: Richa Mahajan
Subject: Re: Reducing GTK+ footprint

[EMAIL PROTECTED] wrote:
> Greetings, 
> 
>  
> 
> Can any one tell me or give me some links to know how I can reduce the
> footprint of GTK. 
> 
>  
> 
> Actually I want to remove some widgets (like frame, color selection,
> file selection etc) which I am not using in my application. 
> 
>  
> 
> Also I want to know that if there is any other alternate way to reduce
> the GTK footprint.

not sure if this is what you mean, but in the debian-installer (hich is 
gtk/dfb based) we provide a set of stripped libraries using the mklibs
tool.
This allows us to save up vakuable space on installation media.

regards

Attilio


------------------------------

Message: 8
Date: Wed, 24 Jan 2007 14:28:54 +0200
From: Tor Lillqvist <[EMAIL PROTECTED]>
Subject: Re: Reducing GTK+ footprint
To: <gtk-app-devel-list@gnome.org>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

[EMAIL PROTECTED] writes:
 > Can any one tell me or give me some links to know how I can reduce
the
 > footprint of GTK. 

Do you mean disk space? Or memory space? On what platform? On most
modern platforms with virtual memory, presumably only those parts of
GTK+ that your code actually uses get paged in.

Anyway, how hard can it be to experiment? Drop stuff you don't want
from the gtk Makefile(.am), try to build gtk+, and see what further
(small?) changes are needed to successfully produce a leaner gtk+
shared library. If you do this and distribute your resulting binaries,
make sure to use a different name for your shared libraries to avoid
confusion!

--tml


------------------------------

Message: 9
Date: Wed, 24 Jan 2007 14:53:36 +0200
From: Tor Lillqvist <[EMAIL PROTECTED]>
Subject: Help ( Regarding  Tailoring of GTK+ )
To: <[EMAIL PROTECTED]>
Cc: gtk-app-devel-list@gnome.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-1

[EMAIL PROTECTED] writes:
 > We are developing an application (Embedded) using GTK and
 > Glade(gtk-dev-2.10.6-win32-1), MSYS-1.0.9, MinGW-3.1.0-1.

Please don't send me personal mail about GTK+ on Windows. Use an
appropriate mailing list, [EMAIL PROTECTED] (You must be
subscribed in order to post to the list, see
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list .)

 > For our embedded application, the memory footprint allowed, maximum
it
 > can be 2MB.

That sounds awfully tight.

 > a) We calculated footprint for small application on Windows. It boils
 > down to around 7.3MB.

 > DLL                                   |Size (KBs)
 > --------------------------------------+-----------
 > libatk-1.0-0.dll????????????????      |138
 > libglib-2.0-0.dll????????????????     |614
 > iconv.dll??????????????????????????   |872
 > intl.dll??????????????????????????????|44
 > libgobject-2.0-0.dll??????????        |222
 > libgdk_pixbuf-2.0-0.dll????           |91
 > libgmodule-2.0-0.dll???????           |17
 > libgtk-win32-2.0-0.dll?????           |3085
 > libgdk-win32-2.0-0.dll????            |657
 > libcairo-2.dll???????????????????     |428
 > libpng13.dll????????????????????      |199
 > zlib1.dll??????????????????????????   |80
 > libpango-1.0-0.dll? ??????            |220
 > libpangocairo-1.0-0.dll               |38
 > libpangowin32-1.0-0.dll???????????    |58
 > GTK Images loaders                    |256
 > Theme engine                          |~ 300 (max)
 > --------------------------------------+-----------
 > TOTAL                                 |~7319

This is not the *memory* footprint you mentioned above. It is the size
on *disk* of the DLLs, which is quite another thing.

 > b) On Linux it is 5.3MB

 > .so                                    |Size (KBs)
 > ---------------------------------------+----------
 > libgtk-x11-2.0 so??????????????        |3100
 > libgdk-2.0.so???????????               |554.2
 > libatk-1.0.so??????????????????????????|109.7
 > libgdk_pixbuf.so                       |92.6
 > libgobject-2.0.so??????????            |253.1
 > libgmodule-2.0.so                      |11.3
 > libpango-1.0.so                        |245.6
 > libcairo.so?????                       |329.4
 > libpangocairo-1.0.so????               |32.9
 > libglib.so???????????????????          |584.2
 > ---------------------------------------+----------
 > TOTAL                                  |~5310

You forget to include here the png and zlib libraries and image
loaders, if this list is supposed to be comparable. And anyway, just
looking at the DLL and .so sizes is mostly an exercise in futility.

 > We wanted to remove the widgets which are not required by our
 > application. Is their any procedure to reduce footprint of GTK+,
where
 > we can trim down gtk, gdk, glib, pango, Cairo???

You presumably do this as part of your *work*? I mean, like, you get
paid to do this? I don't. Why don't you experiment? Why don't you have
a look at what other companies have done to put gtk+ (and GNOME) on
embedded devices. maemo.org is one place to look at.

--tml


------------------------------

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

End of gtk-app-devel-list Digest, Vol 33, Issue 36
**************************************************
The information contained in this e-mail message and in any annexure is 
confidential to the  recipient and may contain privileged information. If you 
are not the intended recipient, please notify the sender and delete the message 
along with any annexure. You should not disclose, copy or otherwise use the 
information contained
in the message or any annexure. Any views expressed in this e-mail are those of 
the individual sender except where the sender specifically states them to be 
the views of SoCrates Software India Pvt Ltd., Bangalore.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to