GTK+ 2.90.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.90.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.90/
 http://download.gnome.org/sources/gtk+/2.90/


8c3c2b461c5a9e0c07dcc320d6362728284e8294f2cd77428d51694c15681264  gtk
+-2.90.5.tar.bz2
e04066adad9f4544d5d0d4f9f467b14581adfae2d1487072c0baca9ddd4bc06e  gtk
+-2.90.5.tar.gz

This is the a development release leading toward 3.0.

Notes:

 * GTK+ 3 will be parallel installable with GTK+ 2.x, and
   this release has been prepared to test this by renaming
   all .pc files, libraries, include paths, and so forth,
   to include a '3.0' component.

 * GTK+ 3 will remove deprecated API from the GTK+ 2.x series
   and make struct members unavailable that have been GSEALed
   in 2.x. Therefore, applications can be prepared for porting
   to GTK+ 3 by making sure that they build with
-DGTK_DISABLE_DEPRECATED
   and -DGSEAL_ENABLE.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.90.4 to 2.90.5
==

* Support NOCONFIGURE in autogen.sh to avoid running configure

* The cairo dependency has been bumped to 1.9.10

* Drop aliasing hacks instead use -Bsymbolic-funtions.

* Bugs:
 589904 Certain drawing in some widgets does not pass on...
 610346 Confusion between GtkWindow:allow-grow and GtkWindow:resizable
 613284 Replace GdkRegion with cairo_region_t
 617386 Migrate API docs from templates to source files (GtkButton)
 617389 Migrate API docs from templates to source files (GtkCalendar)
 617392 Migrate API docs from templates to source (GtkCellEditable)
 621414 Can't select file on file browser popup after choosing to...
 622677 Remove GdkWindowObject public structure
 623239 also show num-lock warning
 623307 Annotate gdk_display_manager_list_displays return value
 623389 [iconview] Fix segfault when using rubberband selection
 623476 [windows] gdk fails to compile
 623520 gtk+ 3 fails to build from outside git source tree
 623845 Use -Bsymbolic
 461618 use GSlice for gtkrequisition

* Deprecations and cleanups:
 - GdkRegion has been removed, and region-using code has been ported
   to cairo_region_t and cairo_rectangle_int_t.
 - The deprecated GdkFont has been removed, together with vestigial
   uses in GTK+, including the GdkFontSel::font property and a GdkFont
   member in GtkStyle.
 - The GdkWindowObject structure has been removed from public headers.
 - The GdkWindow::allow-grow and ::allow-shrink properties have been
removed.

* Quartz:
 - Misc fixed to clipping and color handling
 - Update the DND code for GdkDevice changes

* Translation updates:
 Breton
 Czech
 Estonian
 Galician
 Hebrew
 Kazakh
 Norwegian bokmål
 Slovenian
 Simplified Chinese
 Spanish


Thanks to all contributors
Kristian Rietveld
John Ralls
Emmanuele Bassi
Philip Withnall
Tor Lillqvist
Benjamin Otte
Colin Walters
Javier Jardón
Christian Dywan
Ignacio Casal Quinteiro
William Jon McCann
Tomeu Vizoso
Florian Müllner
Xan Lopez
Sam Thursfield
Tadej Borovšak
John Palmieri
Ryan Lortie
Thomas Wood
Paolo Borelli


July 12, 2010
Matthias Clasen


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

GTK+ 2.21.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.21.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.21/
 http://download.gnome.org/sources/gtk+/2.21/

6b8927e4906deea9a848445ea42a3fb4eb8767b410711e0bf826698cd11ab51b  gtk
+-2.21.5.tar.bz2
350fb48ec5033dc3728d3c0701b7c5ceaafa692557d3c1d620c47956f8382a14  gtk
+-2.21.5.tar.gz

This is a development release leading toward 2.22.

Notes:

 * GTK+ 2.22 is planned to be the last stable GTK+ 2.x release,
   to be released in parallel with GTK+ 3. It will not receive
   major feature work beyond API additions that are required
   to facilitate porting to GTK+ 3.

 * Installing this version will overwrite your existing
   copy of GTK+ 2.20. If you have problems, you'll need
   to reinstall GTK+ 2.20.

 * GTK+ 2.22 will be source and binary compatible with
   the GTK+ 2.20 series; however, the new API additions
   are not yet finalized, so there may be incompatibilities
   between this release and the final 2.22 release.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.21.4 to 2.21.5
==

* Deprecations:
 - Deprecate GdkRegion apis that have no cairo equivalent
 - GtkWindow::allow-grow and ::allow-shrink properties

* New accessors:
 - gdk_window_has_native

* Introspection: misc annotation fixes


Thanks to all contributors:
Benjamin Otte
Javier Jardón
Colin Walters
Tor Lillqvist
Philip Withnall
John Palmieri
Tomeu Vizoso
Xan Lopez
Ignacio Casal Quinteiro


July 12, 2010
Matthias Clasen


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

Re: GTK+ 2.21.5 released

2010-07-12 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/12/2010 12:02 PM, Matthias Clasen wrote:
 GTK+ 2.21.5 is now available for download at:
 
 * Deprecations:
  - GtkWindow::allow-grow and ::allow-shrink properties
 

Why are these properties being depreciated? Is there another way of
doing this? This properties are quite useful for some applications and I
recently converted an application to use this properties due to other
GTK options being taken away. (gtk_window_set_policy).

Kevin

- -- 
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7D0BD5D1
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkw7a3MACgkQ6w2kMH0L1dGIpQCfZYFqNuolPCuR+HDMUXK5rk0J
+boAnReEm42B2duVTd9zhQS4gq52n6xU
=us4l
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK+ 2.21.5 released

2010-07-12 Thread Javier Jardón
2010/7/12 Kevin DeKorte kdeko...@gmail.com:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 07/12/2010 12:02 PM, Matthias Clasen wrote:
 GTK+ 2.21.5 is now available for download at:

 * Deprecations:
  - GtkWindow::allow-grow and ::allow-shrink properties


 Why are these properties being depreciated? Is there another way of
 doing this? This properties are quite useful for some applications and I
 recently converted an application to use this properties due to other
 GTK options being taken away. (gtk_window_set_policy).

Use GtkWindow::resize instead


-- 
Javier Jardón Cabezas
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GTK+ 2.21.5 released

2010-07-12 Thread Kevin DeKorte

On 7/12/2010 5:45 PM, Javier Jardón wrote:

2010/7/12 Kevin DeKortekdeko...@gmail.com:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/12/2010 12:02 PM, Matthias Clasen wrote:

GTK+ 2.21.5 is now available for download at:

* Deprecations:
  - GtkWindow::allow-grow and ::allow-shrink properties



Why are these properties being depreciated? Is there another way of
doing this? This properties are quite useful for some applications and I
recently converted an application to use this properties due to other
GTK options being taken away. (gtk_window_set_policy).


Use GtkWindow::resize instead




Javier,

I don't see a resize property. If you meant resizable, that does not 
work. That only allows the window to get larger, but not smaller if I 
recall.


Kevin

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

Accessor function for application.width ?

2010-07-12 Thread N James Bridge
It's useful to blank out a drawing area by drawing a filled rectangle
with the same size as the window. The examples I have seen get the
dimensions from widget-allocation.width but Devhelp says that the
GtkAllocation structure is GSEALed. At present the method works but is
there an accessor function to use instead? I can't find one.

TIA

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


GTK+ 2.90.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.90.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.90/
 http://download.gnome.org/sources/gtk+/2.90/


8c3c2b461c5a9e0c07dcc320d6362728284e8294f2cd77428d51694c15681264  gtk
+-2.90.5.tar.bz2
e04066adad9f4544d5d0d4f9f467b14581adfae2d1487072c0baca9ddd4bc06e  gtk
+-2.90.5.tar.gz

This is the a development release leading toward 3.0.

Notes:

 * GTK+ 3 will be parallel installable with GTK+ 2.x, and
   this release has been prepared to test this by renaming
   all .pc files, libraries, include paths, and so forth,
   to include a '3.0' component.

 * GTK+ 3 will remove deprecated API from the GTK+ 2.x series
   and make struct members unavailable that have been GSEALed
   in 2.x. Therefore, applications can be prepared for porting
   to GTK+ 3 by making sure that they build with
-DGTK_DISABLE_DEPRECATED
   and -DGSEAL_ENABLE.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.90.4 to 2.90.5
==

* Support NOCONFIGURE in autogen.sh to avoid running configure

* The cairo dependency has been bumped to 1.9.10

* Drop aliasing hacks instead use -Bsymbolic-funtions.

* Bugs:
 589904 Certain drawing in some widgets does not pass on...
 610346 Confusion between GtkWindow:allow-grow and GtkWindow:resizable
 613284 Replace GdkRegion with cairo_region_t
 617386 Migrate API docs from templates to source files (GtkButton)
 617389 Migrate API docs from templates to source files (GtkCalendar)
 617392 Migrate API docs from templates to source (GtkCellEditable)
 621414 Can't select file on file browser popup after choosing to...
 622677 Remove GdkWindowObject public structure
 623239 also show num-lock warning
 623307 Annotate gdk_display_manager_list_displays return value
 623389 [iconview] Fix segfault when using rubberband selection
 623476 [windows] gdk fails to compile
 623520 gtk+ 3 fails to build from outside git source tree
 623845 Use -Bsymbolic
 461618 use GSlice for gtkrequisition

* Deprecations and cleanups:
 - GdkRegion has been removed, and region-using code has been ported
   to cairo_region_t and cairo_rectangle_int_t.
 - The deprecated GdkFont has been removed, together with vestigial
   uses in GTK+, including the GdkFontSel::font property and a GdkFont
   member in GtkStyle.
 - The GdkWindowObject structure has been removed from public headers.
 - The GdkWindow::allow-grow and ::allow-shrink properties have been
removed.

* Quartz:
 - Misc fixed to clipping and color handling
 - Update the DND code for GdkDevice changes

* Translation updates:
 Breton
 Czech
 Estonian
 Galician
 Hebrew
 Kazakh
 Norwegian bokmål
 Slovenian
 Simplified Chinese
 Spanish


Thanks to all contributors
Kristian Rietveld
John Ralls
Emmanuele Bassi
Philip Withnall
Tor Lillqvist
Benjamin Otte
Colin Walters
Javier Jardón
Christian Dywan
Ignacio Casal Quinteiro
William Jon McCann
Tomeu Vizoso
Florian Müllner
Xan Lopez
Sam Thursfield
Tadej Borovšak
John Palmieri
Ryan Lortie
Thomas Wood
Paolo Borelli


July 12, 2010
Matthias Clasen


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


GTK+ 2.21.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.21.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.21/
 http://download.gnome.org/sources/gtk+/2.21/

6b8927e4906deea9a848445ea42a3fb4eb8767b410711e0bf826698cd11ab51b  gtk
+-2.21.5.tar.bz2
350fb48ec5033dc3728d3c0701b7c5ceaafa692557d3c1d620c47956f8382a14  gtk
+-2.21.5.tar.gz

This is a development release leading toward 2.22.

Notes:

 * GTK+ 2.22 is planned to be the last stable GTK+ 2.x release,
   to be released in parallel with GTK+ 3. It will not receive
   major feature work beyond API additions that are required
   to facilitate porting to GTK+ 3.

 * Installing this version will overwrite your existing
   copy of GTK+ 2.20. If you have problems, you'll need
   to reinstall GTK+ 2.20.

 * GTK+ 2.22 will be source and binary compatible with
   the GTK+ 2.20 series; however, the new API additions
   are not yet finalized, so there may be incompatibilities
   between this release and the final 2.22 release.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.21.4 to 2.21.5
==

* Deprecations:
 - Deprecate GdkRegion apis that have no cairo equivalent
 - GtkWindow::allow-grow and ::allow-shrink properties

* New accessors:
 - gdk_window_has_native

* Introspection: misc annotation fixes


Thanks to all contributors:
Benjamin Otte
Javier Jardón
Colin Walters
Tor Lillqvist
Philip Withnall
John Palmieri
Tomeu Vizoso
Xan Lopez
Ignacio Casal Quinteiro


July 12, 2010
Matthias Clasen


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


dconf 0.4.2

2010-07-12 Thread Ryan Lortie
I just did a dconf release to go with the new GLib release.

There have been some crasher fixes and the editor has been quite a bit
improved.

Cheers

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


some questions about runs, glyphs, chars, bytes, clusters

2010-07-12 Thread august

Hi, 

I am making some tests to try and learn more about Pango.  Right now
I am trying to step through a layout line by line, run by run, and
then word by word.

I was hoping someone might be able to help me out with some
questions.

Here is what I am doing.

static char * text = {  flower power };
// I get the layout
PangoLayout *layout;
layout = pango_layout_new(pango_context);
pango_layout_set_text(layout, text, -1);
pango_layout_context_changed(layout);


// I then get iterators for lines and stuff
PangoLayoutIter* p_iter = 0;
p_iter = pango_layout_get_iter(layout);
PangoLayoutLine* p_line = pango_layout_iter_get_line(p_iter);
GSList* current_run = p_line-runs;
PangoLayoutRun* p_run=(PangoLayoutRun*)current_run-data;

// I then try to get attribute info for this run
PangoLogAttr * logattrs = (PangoLogAttr *) malloc( 
(p_run-item-num_chars +1 ) * sizeof(PangoLogAttr) );
pango_break(text+ p_run-item-offset, p_run-item-length,
  p_run-item-analysis, logattrs,
  p_run-item-num_chars+1);

// Am I doing this wrong?
// This then gives me a PangoLogAttr for every byte char in the text
// string, correct?  But, since there could be more than one char for 
// a glyph, where do I check for word_end?

// Can someone tell me here what num_chars refers to in the item?
// is that character bytes? 
// is that not always the same as item-length?
// Also, what is the difference between a byte, a character, a glyph,
// and a cluster in Pango?  In the docs and naming of variables, is
// it consistently named?

// Then, I try to step through the run by glyph and logattr to see
// where words start and end
// Is this correct? 

   for(int i=0;ip_run-glyphs-num_glyphs;i++) {
j=p_run-glyphs-log_clusters[i];
// I print out some info about the word start and end
printf(\t\tword_start:%d, , logattrs[j].is_word_start);
printf(word_end:%d \n, logattrs[j].is_word_end);
}


The funny thing that I notice heres is that the f and the l in
flower is considered one glyph.  Is that right?


Sorry if my questions are basic.  I can see how complex type layout
is now that I am getting my hands dirty.  Any help would be greatly
appreciated.

thank you -august.

___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list


Sending GdkEvents to Gtk Widget

2010-07-12 Thread Bharathwaaj Srinivasan
Hi,

Is it possible to send GdkEvents to a GtkWidget from the application?

Currently I've a GIOChannel which is listening to a socket and the GSource
is attached to the Glib main loop.

g_type_init();
g_thread_init(NULL);
gdk_threads_init();
gdk_threads_enter();
gtk_init(NULL, NULL);

channel = g_io_channel_unix_new (fd);
g_io_channel_set_encoding (channel, NULL, NULL);
g_io_channel_set_buffered (channel, FALSE);

source = g_io_create_watch (channel, G_IO_IN);
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_can_recurse (source, TRUE);
g_source_set_callback (source, (GSourceFunc) event_handler, NULL, NULL);
g_source_attach (source, NULL);

g_source_unref (source);
g_io_channel_unref(channel);

gtk_main();
gdk_threads_leave();

GdkEvents (Keyboard events) are passed from say another process by writing
to the socket fd.

Glib calls the callback event_handler for data available to read. The
event_handler callback reads the GdkEvent passed by another process and
calls gtk_main_do_event to pass the event to the widget.

But this doesn't work and the application freezes.

I use gdk_threads_enter and gdk_threads_leave in the callback and before
gtk_main for making gtk thread aware as the callback comes from Glib.

Kindly help me in providing a mechanism to pass GdkEvents from the top. If
this is not possible, please explain why.

The main purpose for which I need this is I'm using GtkWebKit and I send Tab
key event to make the focus move to the next element in the Webview.

Events are being fed from another process.

Kind regards,
Bharath
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Sending GdkEvents to Gtk Widget

2010-07-12 Thread Andy Stewart
Hi Bharathwaaj,

I'm a developer of gtk2hs (Haskell binding to gtk+).

I have fix same problem (WebKit widget and GdkEvent) at Haskell side.
(https://patch-tag.com/r/AndyStewart/gtk-serialized-event/snapshot/current/content/pretty/Graphics/UI/Gtk/Gdk/SerializedEvent.hsc)
This is screenshot : 
http://farm5.static.flickr.com/4080/4758242386_5230d3d54d_b.jpg

Though i use Haskell, but i can explain how to pass GdkEvent from one
process to another.

Below are step:

1) Serialize GdkEvent at *server* process.
2) Then send SerializeEvent over the network
3) When *client* process receive SerializeEvent from network, re-build
GdkEvent.
4) Then you can use gtk_main_do_event propagate same event on current
focus widget, or use gtk_widget_event propagate event on specify widget.

Only trick is you need use idle_add_full wrap gtk_main_do_event to make
sure gtk_main_do_event running in *main thread* and not *listen event
thread*.

Hope above will help you. :)

Cheers,

  -- Andy

Bharathwaaj Srinivasan bharathwaa...@gmail.com writes:

 Hi,

 Is it possible to send GdkEvents to a GtkWidget from the application?

 Currently I've a GIOChannel which is listening to a socket and the GSource is 
 attached to the Glib
 main loop.

     g_type_init();
     g_thread_init(NULL);
     gdk_threads_init();
     gdk_threads_enter();
     gtk_init(NULL, NULL);

     channel = g_io_channel_unix_new (fd);
     g_io_channel_set_encoding (channel, NULL, NULL);
     g_io_channel_set_buffered (channel, FALSE);

     source = g_io_create_watch (channel, G_IO_IN);
     g_source_set_priority (source, G_PRIORITY_DEFAULT);
     g_source_set_can_recurse (source, TRUE);
     g_source_set_callback (source, (GSourceFunc) event_handler, NULL, NULL);
     g_source_attach (source, NULL);

     g_source_unref (source);
     g_io_channel_unref(channel);

     gtk_main();
     gdk_threads_leave();

 GdkEvents (Keyboard events) are passed from say another process by writing to 
 the socket fd.

 Glib calls the callback event_handler for data available to read. The 
 event_handler callback reads
 the GdkEvent passed by
 another process and calls gtk_main_do_event to pass the event to the widget.

 But this doesn't work and the application freezes.

 I use gdk_threads_enter and gdk_threads_leave in the callback and before 
 gtk_main for making gtk
 thread aware as the
 callback comes from Glib.

 Kindly help me in providing a mechanism to pass GdkEvents from the top. If 
 this is not possible,
 please explain why.

 The main purpose for which I need this is I'm using GtkWebKit and I send Tab 
 key event to make the
 focus move to the next
 element in the Webview.

 Events are being fed from another process.

 Kind regards,
 Bharath

 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: signal apparently missing on gtkcalendar

2010-07-12 Thread Robert Pearce
Hi John,

On Sun, 11 Jul 2010 22:55:15 -0300 you wrote:
 
 I am reading the documentation of GtkCalendar, more precisely at the
 signals. There are the month-changed and day-selected signal, but why
 not a signal to represent the year changing? 

Presumably because it displays a whole month at a time, from which the
user can pick a day. If the year changes then the month changes too, so
I'm guessing the month-changed signal will be emitted. That would also
be why the naming of those two signals is different; month-changed
means the display has been updated, whereas day-selected means the user
has picked one of the displayed options.

Cheers,
Rob
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Text cursor movement on Windows

2010-07-12 Thread Fredrik Corneliusson
Hi,
The GTK cursor movement convention used to move the cursor one word
forward (CTRL+Right) differs from what is normal in MS Windows
(Wimp-theme does not solve this).

The normal behavior in MS Windows is to move to the start of the next
word (include the space) and on GTK it only moves to the end of the
word.
For text editing intensive applications this is an annoyance for
experienced users.

Does anyone have hints on how to go about make this configurable in a
client application or if this needs changes at the GTK core?

Regards,
Fredrik
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Doubts about creating a new widget

2010-07-12 Thread CaStarCo
Hello, my name is Andreu and i'm new in this list.

I have a doubt about if I should create a new widget or if there is a widget
that could supply my needs.

I'll describe what I need: I want to make a left column in the window with
flat toggle buttons (with the 100% of the column width) that, when I press
one of the buttons then the buttons that are below than it should go down to
give space to a icon list with a vertical scroll bar.

I need it to sort the elements in a diagram editor that i'm programming.

Thanks in advance :) .

-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Text cursor movement on Windows

2010-07-12 Thread Fredrik Corneliusson
Replying to myself.

I found a semi working solution here:
http://ubuntuforums.org/showpost.php?p=9202312postcount=6

It changes the key binding for forward word using the gtkrc file so
that it generates two move-cursor events:
  bind ControlRight { move-cursor (words, 2, 0) move-cursor
(words, -1, 0) }

However that does not work for the last word in the buffer as it in
that case just moves one forward and one back.

After some experimentation I came up with this instead that seem to
work better for my application:
  bind ControlRight { move-cursor (words, 1, 0) move-cursor
(logical-positions, 1, 0) }

Obviously this does not jump to the start of the next word if there
are more spaces (or other chracters)  than one but that is not so
common in natural language that my application is used for.

The real solution would probably be to create a new move unit (or user
parameter to the word unit) that move to start of next word.

However even if this quick solution is buggy my users seem to prefer
it over the default GTK behavior.

I've attached the gtkrc in case it would be of interest for anyone.

/Fredrik

On Mon, Jul 12, 2010 at 12:11 PM, Fredrik Corneliusson
fredrik.cornelius...@gmail.com wrote:
 Hi,
 The GTK cursor movement convention used to move the cursor one word
 forward (CTRL+Right) differs from what is normal in MS Windows
 (Wimp-theme does not solve this).

 The normal behavior in MS Windows is to move to the start of the next
 word (include the space) and on GTK it only moves to the end of the
 word.
 For text editing intensive applications this is an annoyance for
 experienced users.

 Does anyone have hints on how to go about make this configurable in a
 client application or if this needs changes at the GTK core?

 Regards,
 Fredrik



gtkrc
Description: Binary data
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Sending GdkEvents to Gtk Widget

2010-07-12 Thread Bharathwaaj Srinivasan
Hi Andy,

I couldn't understand the meaning of serializeEvent.

But still I simply tried the following in the socket source callback from
GLib.

GdkEvent event;
memset(event, 0, sizeof(GdkEvent));
event.key.type = GDK_KEY_PRESS;
event.key.keyval = GDK_Tab;
event.key.send_event = TRUE;
gdk_threads_enter();
printf(Sending Tab event to gtk_idle_add_full\n);
gtk_idle_add_full(G_PRIORITY_DEFAULT,
(GSourceFunc)gtk_main_do_event, NULL, event, NULL);
gdk_threads_leave();

This also lead to the same behaviour. The WebKit Gtk main window freezed
from responding for further events.

I also tried replacing gtk_idle_add_full with g_idle_add_full. Still same
behaviour.

Please help me if i'm missing something.

Kind regards,
Bharath


On Mon, Jul 12, 2010 at 12:33 PM, Andy Stewart lazycat.mana...@gmail.comwrote:

 Hi Bharathwaaj,

 I'm a developer of gtk2hs (Haskell binding to gtk+).

 I have fix same problem (WebKit widget and GdkEvent) at Haskell side.
 (
 https://patch-tag.com/r/AndyStewart/gtk-serialized-event/snapshot/current/content/pretty/Graphics/UI/Gtk/Gdk/SerializedEvent.hsc
 )
 This is screenshot :
 http://farm5.static.flickr.com/4080/4758242386_5230d3d54d_b.jpg

 Though i use Haskell, but i can explain how to pass GdkEvent from one
 process to another.

 Below are step:

 1) Serialize GdkEvent at *server* process.
 2) Then send SerializeEvent over the network
 3) When *client* process receive SerializeEvent from network, re-build
 GdkEvent.
 4) Then you can use gtk_main_do_event propagate same event on current
 focus widget, or use gtk_widget_event propagate event on specify widget.

 Only trick is you need use idle_add_full wrap gtk_main_do_event to make
 sure gtk_main_do_event running in *main thread* and not *listen event
 thread*.

 Hope above will help you. :)

 Cheers,

  -- Andy

 Bharathwaaj Srinivasan bharathwaa...@gmail.com writes:

  Hi,
 
  Is it possible to send GdkEvents to a GtkWidget from the application?
 
  Currently I've a GIOChannel which is listening to a socket and the
 GSource is attached to the Glib
  main loop.
 
  g_type_init();
  g_thread_init(NULL);
  gdk_threads_init();
  gdk_threads_enter();
  gtk_init(NULL, NULL);
 
  channel = g_io_channel_unix_new (fd);
  g_io_channel_set_encoding (channel, NULL, NULL);
  g_io_channel_set_buffered (channel, FALSE);
 
  source = g_io_create_watch (channel, G_IO_IN);
  g_source_set_priority (source, G_PRIORITY_DEFAULT);
  g_source_set_can_recurse (source, TRUE);
  g_source_set_callback (source, (GSourceFunc) event_handler, NULL,
 NULL);
  g_source_attach (source, NULL);
 
  g_source_unref (source);
  g_io_channel_unref(channel);
 
  gtk_main();
  gdk_threads_leave();
 
  GdkEvents (Keyboard events) are passed from say another process by
 writing to the socket fd.
 
  Glib calls the callback event_handler for data available to read. The
 event_handler callback reads
  the GdkEvent passed by
  another process and calls gtk_main_do_event to pass the event to the
 widget.
 
  But this doesn't work and the application freezes.
 
  I use gdk_threads_enter and gdk_threads_leave in the callback and before
 gtk_main for making gtk
  thread aware as the
  callback comes from Glib.
 
  Kindly help me in providing a mechanism to pass GdkEvents from the top.
 If this is not possible,
  please explain why.
 
  The main purpose for which I need this is I'm using GtkWebKit and I send
 Tab key event to make the
  focus move to the next
  element in the Webview.
 
  Events are being fed from another process.
 
  Kind regards,
  Bharath
 
  ___
  gtk-list mailing list
  gtk-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/gtk-list

 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GTK+ 2.90.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.90.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.90/
 http://download.gnome.org/sources/gtk+/2.90/


8c3c2b461c5a9e0c07dcc320d6362728284e8294f2cd77428d51694c15681264  gtk
+-2.90.5.tar.bz2
e04066adad9f4544d5d0d4f9f467b14581adfae2d1487072c0baca9ddd4bc06e  gtk
+-2.90.5.tar.gz

This is the a development release leading toward 3.0.

Notes:

 * GTK+ 3 will be parallel installable with GTK+ 2.x, and
   this release has been prepared to test this by renaming
   all .pc files, libraries, include paths, and so forth,
   to include a '3.0' component.

 * GTK+ 3 will remove deprecated API from the GTK+ 2.x series
   and make struct members unavailable that have been GSEALed
   in 2.x. Therefore, applications can be prepared for porting
   to GTK+ 3 by making sure that they build with
-DGTK_DISABLE_DEPRECATED
   and -DGSEAL_ENABLE.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.90.4 to 2.90.5
==

* Support NOCONFIGURE in autogen.sh to avoid running configure

* The cairo dependency has been bumped to 1.9.10

* Drop aliasing hacks instead use -Bsymbolic-funtions.

* Bugs:
 589904 Certain drawing in some widgets does not pass on...
 610346 Confusion between GtkWindow:allow-grow and GtkWindow:resizable
 613284 Replace GdkRegion with cairo_region_t
 617386 Migrate API docs from templates to source files (GtkButton)
 617389 Migrate API docs from templates to source files (GtkCalendar)
 617392 Migrate API docs from templates to source (GtkCellEditable)
 621414 Can't select file on file browser popup after choosing to...
 622677 Remove GdkWindowObject public structure
 623239 also show num-lock warning
 623307 Annotate gdk_display_manager_list_displays return value
 623389 [iconview] Fix segfault when using rubberband selection
 623476 [windows] gdk fails to compile
 623520 gtk+ 3 fails to build from outside git source tree
 623845 Use -Bsymbolic
 461618 use GSlice for gtkrequisition

* Deprecations and cleanups:
 - GdkRegion has been removed, and region-using code has been ported
   to cairo_region_t and cairo_rectangle_int_t.
 - The deprecated GdkFont has been removed, together with vestigial
   uses in GTK+, including the GdkFontSel::font property and a GdkFont
   member in GtkStyle.
 - The GdkWindowObject structure has been removed from public headers.
 - The GdkWindow::allow-grow and ::allow-shrink properties have been
removed.

* Quartz:
 - Misc fixed to clipping and color handling
 - Update the DND code for GdkDevice changes

* Translation updates:
 Breton
 Czech
 Estonian
 Galician
 Hebrew
 Kazakh
 Norwegian bokmål
 Slovenian
 Simplified Chinese
 Spanish


Thanks to all contributors
Kristian Rietveld
John Ralls
Emmanuele Bassi
Philip Withnall
Tor Lillqvist
Benjamin Otte
Colin Walters
Javier Jardón
Christian Dywan
Ignacio Casal Quinteiro
William Jon McCann
Tomeu Vizoso
Florian Müllner
Xan Lopez
Sam Thursfield
Tadej Borovšak
John Palmieri
Ryan Lortie
Thomas Wood
Paolo Borelli


July 12, 2010
Matthias Clasen


___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Doubts about creating a new widget

2010-07-12 Thread Nicola Fontana
Il giorno Mon, 12 Jul 2010 14:19:12 +0200
CaStarCo casta...@gmail.com ha scritto:

 Hello, my name is Andreu and i'm new in this list.
 
 I have a doubt about if I should create a new widget or if there is a widget
 that could supply my needs.
 
 I'll describe what I need: I want to make a left column in the window with
 flat toggle buttons (with the 100% of the column width) that, when I press
 one of the buttons then the buttons that are below than it should go down to
 give space to a icon list with a vertical scroll bar.
 
 I need it to sort the elements in a diagram editor that i'm programming.

From what I understood, I'd use GtkExpander.

-- 
Nicola
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GTK+ 2.21.5 released

2010-07-12 Thread Matthias Clasen
GTK+ 2.21.5 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/2.21/
 http://download.gnome.org/sources/gtk+/2.21/

6b8927e4906deea9a848445ea42a3fb4eb8767b410711e0bf826698cd11ab51b  gtk
+-2.21.5.tar.bz2
350fb48ec5033dc3728d3c0701b7c5ceaafa692557d3c1d620c47956f8382a14  gtk
+-2.21.5.tar.gz

This is a development release leading toward 2.22.

Notes:

 * GTK+ 2.22 is planned to be the last stable GTK+ 2.x release,
   to be released in parallel with GTK+ 3. It will not receive
   major feature work beyond API additions that are required
   to facilitate porting to GTK+ 3.

 * Installing this version will overwrite your existing
   copy of GTK+ 2.20. If you have problems, you'll need
   to reinstall GTK+ 2.20.

 * GTK+ 2.22 will be source and binary compatible with
   the GTK+ 2.20 series; however, the new API additions
   are not yet finalized, so there may be incompatibilities
   between this release and the final 2.22 release.

 * Bugs should be reported to http://bugzilla.gnome.org.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.x is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Contributing


GTK+ is a large project and relies on voluntary contributions.
We are actively searching for new contributors in various areas
and invite everyone to help project development.
If you are willing to participate, please subscribe to the project
mailing lists to offer your help and read over our list of vacant
project tasks:
   http://live.gnome.org/GtkTasks


Overview of Changes from GTK+ 2.21.4 to 2.21.5
==

* Deprecations:
 - Deprecate GdkRegion apis that have no cairo equivalent
 - GtkWindow::allow-grow and ::allow-shrink properties

* New accessors:
 - gdk_window_has_native

* Introspection: misc annotation fixes


Thanks to all contributors:
Benjamin Otte
Javier Jardón
Colin Walters
Tor Lillqvist
Philip Withnall
John Palmieri
Tomeu Vizoso
Xan Lopez
Ignacio Casal Quinteiro


July 12, 2010
Matthias Clasen


___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Doubts about creating a new widget

2010-07-12 Thread CaStarCo
Thanks Nicola :D ,

i haven't found any screenshot of GtkExpander widget, there is any
screenshot in any place?

2010/7/12 Nicola Fontana n...@entidi.it

 Il giorno Mon, 12 Jul 2010 14:19:12 +0200
 CaStarCo casta...@gmail.com ha scritto:

  Hello, my name is Andreu and i'm new in this list.
 
  I have a doubt about if I should create a new widget or if there is a
 widget
  that could supply my needs.
 
  I'll describe what I need: I want to make a left column in the window
 with
  flat toggle buttons (with the 100% of the column width) that, when I
 press
  one of the buttons then the buttons that are below than it should go down
 to
  give space to a icon list with a vertical scroll bar.
 
  I need it to sort the elements in a diagram editor that i'm programming.

 From what I understood, I'd use GtkExpander.

 --
 Nicola




-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Doubts about creating a new widget

2010-07-12 Thread Jeff Hallock
Hmmm…. I able to find one immediately by googling “gtk expander screenshot”. 
Who’d a thought…

You can also always give it a try yourself…


From: gtk-list-boun...@gnome.org [mailto:gtk-list-boun...@gnome.org] On Behalf 
Of CaStarCo
Sent: Monday, July 12, 2010 2:46 PM
To: gtk-list@gnome.org
Subject: Re: Doubts about creating a new widget

Thanks Nicola :D ,

i haven't found any screenshot of GtkExpander widget, there is any screenshot 
in any place?

2010/7/12 Nicola Fontana n...@entidi.itmailto:n...@entidi.it
Il giorno Mon, 12 Jul 2010 14:19:12 +0200
CaStarCo casta...@gmail.commailto:casta...@gmail.com ha scritto:

 Hello, my name is Andreu and i'm new in this list.

 I have a doubt about if I should create a new widget or if there is a widget
 that could supply my needs.

 I'll describe what I need: I want to make a left column in the window with
 flat toggle buttons (with the 100% of the column width) that, when I press
 one of the buttons then the buttons that are below than it should go down to
 give space to a icon list with a vertical scroll bar.

 I need it to sort the elements in a diagram editor that i'm programming.
From what I understood, I'd use GtkExpander.

--
Nicola



--
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Doubts about creating a new widget

2010-07-12 Thread CaStarCo
U_U Thanks, i made a bad search before.

2010/7/12 Jeff Hallock jhall...@wbanda.com

  Hmmm…. I able to find one immediately by googling “gtk expander
 screenshot”. Who’d a thought…



 You can also always give it a try yourself…





 *From:* gtk-list-boun...@gnome.org [mailto:gtk-list-boun...@gnome.org] *On
 Behalf Of *CaStarCo
 *Sent:* Monday, July 12, 2010 2:46 PM
 *To:* gtk-list@gnome.org
 *Subject:* Re: Doubts about creating a new widget



 Thanks Nicola :D ,



 i haven't found any screenshot of GtkExpander widget, there is any
 screenshot in any place?



 2010/7/12 Nicola Fontana n...@entidi.it

 Il giorno Mon, 12 Jul 2010 14:19:12 +0200
 CaStarCo casta...@gmail.com ha scritto:


  Hello, my name is Andreu and i'm new in this list.
 
  I have a doubt about if I should create a new widget or if there is a
 widget
  that could supply my needs.
 
  I'll describe what I need: I want to make a left column in the window
 with
  flat toggle buttons (with the 100% of the column width) that, when I
 press
  one of the buttons then the buttons that are below than it should go down
 to
  give space to a icon list with a vertical scroll bar.
 
  I need it to sort the elements in a diagram editor that i'm programming.

 From what I understood, I'd use GtkExpander.

 --
 Nicola




 --
 - Per la llibertat del coneixement -
 - Per la llibertat de la ment...   -




-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: RE: Doubts about creating a new widget

2010-07-12 Thread american . communist . party

On Jul 12, 2010 11:51am, Jeff Hallock jhall...@wbanda.com wrote:

Hmmm…. I able to find one immediately by googling “gtk expander
screenshot”. Who'da thought…


I monitor this list because I know I'll eventually learn something new, I  
am far from complete in my knowledge of stuff. For giggles I decided to  
take Jeff's advice and google exactly that; gtk expander screen shot,  
since I wasn't exactly sure what an expander was, and found this:


http://www.laas02.org/?page_id=16

Its apparently some intelligent guy's blog, and the page in question is a  
nice little treatise on gtk widgets. Its a little better than the canonical  
documentation, it gives a little more background on each gtk widget, some  
context with code (Mono, but who cares?) and some more detail on each  
option, given that the information isn't already presented earlier on and  
not redundant. Its very brief, but did contain some info new to me. This  
could actually help me picture what I need to do and what I need out of a  
gtk widget in the future. If you need to put a particular scenario in  
context with regard to gtk and the rather dry documentation canon doesn't  
really help, you might give this guy's blog a perusal.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Sending GdkEvents to Gtk Widget

2010-07-12 Thread Bharathwaaj Srinivasan
Hi Andy,

Thank you very much for your patient reply.

I had actually filled the GdkWindow field. But while copy pasting line by
line, it somehow got missed. :P

Now it is solved. The problem was, I was blocking the callback function
without returning it to GLib!

Since mine was kinda minimal test program, I had written an infinite while
loop in the GSource callback function to call gtk_main_do_event without
returning the GLib callback. How silly! :(

Also i didn't add idle_add_full. But directly called gtk_main_do_event and
it worked, because the callback comes from the same g main loop which gtk is
running. I just added the gdk_threads_enter/leave calls before calling
gtk_main_do_event.

Actually, in my case there is no gtk involved in the server. I get a
platform specific event which I've to remap to GdkEvent to be passed to the
browser.

Thank you once again!

Cheers,
Bharath

On Mon, Jul 12, 2010 at 9:49 PM, Andy Stewart lazycat.mana...@gmail.comwrote:

 Hi Bharathwaaj,

 Bharathwaaj Srinivasan bharathwaa...@gmail.com writes:

  Hi Andy,
 
  I couldn't understand the meaning of serializeEvent.
 Because it's Haskell. :)

 I will explain at below.
 
  But still I simply tried the following in the socket source callback from
 GLib.
 
  GdkEvent event;
  memset(event, 0, sizeof(GdkEvent));
  event.key.type = GDK_KEY_PRESS;
  event.key.keyval = GDK_Tab;
  event.key.send_event = TRUE;
 This is wrong,
 you should get field value from event that return by signal
 key_press_event,
 and not build those filed by yourself.
 Then you can send *all* GdkEvent to another process, and not just Tab key.

 Here is C structure of GdkEventKey:

 typedef struct {
  GdkEventType type;
  GdkWindow *window;
  gint8 send_event;
  guint32 time;
  guint state;
  guint keyval;
  gint length;
  gchar *string;
  guint16 hardware_keycode;
  guint8 group;
  guint is_modifier : 1;
 } GdkEventKey;

 On *server* process, you should hang some function on singal
 key_press_event, then you can get keyPress event when you typing
 something at server side.

 Then you need pick-up public field from keyPress event.
 Example:

... singalEvent is get in key_press_event signal ...

...
serialize_event_type = signalEvent.key.type
serialize_event_keyval = signalEvent.key.keyval
serialize_event_send_event = signalEvent.key.send_event
...

 Note, you need serialize *all* public field in GdkEventKey except
 *GdkWindow* field.

 Because, when you send event to *client* process, you want propagate
 event in *client* process, so you need *client* process widget GdkWindow
 and not *server* one.

 After you serialize event value, you need send to network, below i
 explain how to handle at client side.

  gdk_threads_enter();
  printf(Sending Tab event to gtk_idle_add_full\n);
  gtk_idle_add_full(G_PRIORITY_DEFAULT,
 (GSourceFunc)gtk_main_do_event, NULL, event,
  NULL);
  gdk_threads_leave();
 
  This also lead to the same behaviour. The WebKit Gtk main window freezed
 from responding for further
  events.
 Because you haven't set field GdkWindow of GdkEventKey, it's 0 by your
 memset.

 When you call gtk_main_do_event, gtk_main_do_event will
 lookup GdkWindow field to decide which widget need receive event, since
 GdkWindow field is 0, your *client* process will freezed.

 So client should do like this.

 1) When your *client* receive serialize event from network, then use
 below code to fill all flied except *GdkWindow* field:

GdkEvent event;
memset(event, 0, sizeof(GdkEvent));
...
 event.key.type = serialize_event_type
event.key.keyval = serialize_event_keyval
event.key.send_event = serialize_event_send_event
...

 2) Then fill *GdkWindow* field with client widget.

You need get GdkWindow pointer from WebKit widget.

widget_window_ptr = webkitWidget.window

Then fill event GdkWindow field with webkit GdkWindow pointer.

event.key.window = widget_window_ptr

 That's all.

 Cheers,

  -- Andy

 
  I also tried replacing gtk_idle_add_full with g_idle_add_full. Still same
 behaviour.
 
  Please help me if i'm missing something.
 
  Kind regards,
  Bharath
 
  On Mon, Jul 12, 2010 at 12:33 PM, Andy Stewart 
 lazycat.mana...@gmail.com wrote:
 
  Hi Bharathwaaj,
 
  I'm a developer of gtk2hs (Haskell binding to gtk+).
 
  I have fix same problem (WebKit widget and GdkEvent) at Haskell side.
  (
 https://patch-tag.com/r/AndyStewart/gtk-serialized-event/snapshot/current/content/pretty/Graphics/UI/Gtk/Gdk/
  SerializedEvent.hsc)
  This is screenshot :
 http://farm5.static.flickr.com/4080/4758242386_5230d3d54d_b.jpg
 
  Though i use Haskell, but i can explain how to pass GdkEvent from one
  process to another.
 
  Below are step:
 
  1) Serialize GdkEvent at *server* process.
  2) Then send SerializeEvent over the network
  3) When *client* 

Re: RE: Doubts about creating a new widget

2010-07-12 Thread CaStarCo
Yes, it's the web i've found too, it's interesting :) .

Now I have question about GtkExpander, I've searched in the documentation
page: http://library.gnome.org/devel/gtk/stable/GtkExpander.html

http://library.gnome.org/devel/gtk/stable/GtkExpander.htmlHow can I remove
or hide the left icon (a triangle, or, in my case, a little square with a
cross inside) that are in all the GtkExpander widgets?

I can't find it here :p. (I want to put my own label widget with an icon
instead of a simple text label, i know how can i do this, but if i do it
then the square it's unneeded and looks ugly)

Thanks in advance! :)

2010/7/12 american.communist.pa...@gmail.com

 On Jul 12, 2010 11:51am, Jeff Hallock jhall...@wbanda.com wrote:
  Hmmm…. I able to find one immediately by googling “gtk expander
  screenshot”. Who’d a thought…

 I monitor this list because I know I'll eventually learn something new, I
 am far from complete in my knowledge of stuff. For giggles I decided to
 take Jeff's advice and google exactly that; gtk expander screen shot,
 since I wasn't exactly sure what an expander was, and found this:

 http://www.laas02.org/?page_id=16

 Its apparently some intelligent guy's blog, and the page in question is a
 nice little treatise on gtk widgets. Its a little better than the canonical
 documentation, it gives a little more background on each gtk widget, some
 context with code (Mono, but who cares?) and some more detail on each
 option, given that the information isn't already presented earlier on and
 not redundant. Its very brief, but did contain some info new to me. This
 could actually help me picture what I need to do and what I need out of a
 gtk widget in the future. If you need to put a particular scenario in
 context with regard to gtk and the rather dry documentation canon doesn't
 really help, you might give this guy's blog a perusal.
 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list




-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: RE: Doubts about creating a new widget

2010-07-12 Thread CaStarCo
I'm programming in Vala, and I've wrote this (for testing the class):

  menu_entry2.add_with_properties (new ToggleButton.with_label (JAJAJA),
expander-size, 0);

because (in theory, the expander-size property is the size of the left
triangle..), but in the practice the code is equivalent to:

  menu_entry2.add (new ToggleButton.with_label (JAJAJA));

and the squere is still appearing.

The documentation says that this property is read-only... but.. then, why is
needed, i understant that exists the possibility of set it, anyone knows
how?

Thanks in advance :) .

2010/7/12 CaStarCo casta...@gmail.com

 Yes, it's the web i've found too, it's interesting :) .

 Now I have question about GtkExpander, I've searched in the documentation
 page: http://library.gnome.org/devel/gtk/stable/GtkExpander.html

 http://library.gnome.org/devel/gtk/stable/GtkExpander.htmlHow can I
 remove or hide the left icon (a triangle, or, in my case, a little square
 with a cross inside) that are in all the GtkExpander widgets?

 I can't find it here :p. (I want to put my own label widget with an icon
 instead of a simple text label, i know how can i do this, but if i do it
 then the square it's unneeded and looks ugly)

 Thanks in advance! :)


-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list