Re: gtk_widget_set_uposition() in Gtk-2.0?

2004-06-18 Thread Sven Neumann
Hi,

"David J. Singer" <[EMAIL PROTECTED]> writes:

> I notice from the documentation that gtk_widget_set_uposition()
> is deprecated in Gtk-2.0, but there is no mention of how the same
> functionality should be implemented...  Can anyone tell me?

This function is only really useful on a window, so you are supposed
to use gtk_window_set_position() instead.
 
> As a related point, even when I define GTK_DISABLE_DEPRECATED,
> I get no errors or warnings when trying to use deprecated functions.
> Have I misinterpreted the function of this flag?

Are you compiling with the compiler flag -Wall? If not, I strongly
suggest you do.


Sven

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Compile of gtk243 on cygwin fails at configure

2004-06-18 Thread Roger Leigh
Guy Stalnaker <[EMAIL PROTECTED]> writes:

> Odd situation here.  Running cygwin 1.5x.  Pango compiles and installs
> successfully.  atk compiles and installs successfully.  glib compiles
> and installs successfully.  I used --prefix=/usr for all of them.
> gtk+ fails on the configure pass however with an error:
>
> 
> configure:29908: error:
> *** Cannot link to Accessibility Toolkit.  Accessibility Toolkit is required
> *** to build GTK+
> 
> And /usr/lib shows:
> 
> libatk-1.0.1
> litatk-1.0.la
> 
>
> /usr/include/atk-1.0/atk exists and has the requisite .h files in it.

Do you have a /bin/cygatk-1.0.dll?  If not, you only have the link
library installed.  I found this when building--you'll need to
libtoolize with a recent libtool and rebuild all the autotools stuff.
You might also need to add -no-undefined to the library _LDFLAGS or
else the DLL won't get built.  You'll see warnings when building the
library if this is the case.


-- 
Roger Leigh

Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


gtk_widget_set_uposition() in Gtk-2.0?

2004-06-18 Thread David J. Singer

I notice from the documentation that gtk_widget_set_uposition()
is deprecated in Gtk-2.0, but there is no mention of how the same
functionality should be implemented...  Can anyone tell me?

As a related point, even when I define GTK_DISABLE_DEPRECATED,
I get no errors or warnings when trying to use deprecated functions.
Have I misinterpreted the function of this flag?


-- 
David J. Singer
[EMAIL PROTECTED]
"Time flies like an arrow, fruit flies like a banana"

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


pixmap directory on windows

2004-06-18 Thread Chris W
I finally got a few projects to compile.  Now I guess I will go back and 
figure out how to do it with out using duct tape.  Anyway, make install 
didn't seem to put my pix map files where they need to go so I put them 
there manually but it still gives me the error.  I am wondering how the 
program finds the directories since  /usr/local/share/calculator/pixmaps 
is only a valid dir inside cygwin where is my application really looking 
for the pixmap files?

--
Chris W
Bring Back the HP 15C
http://hp15c.org
Not getting the gifts you want?  The Wish Zone can help.
http://thewishzone.com
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: draw a 16bpp unindexed image on PC linux

2004-06-18 Thread John Cupitt
On Fri, 18 Jun 2004 15:16:59 +0300, Juhana Sadeharju
<[EMAIL PROTECTED]> wrote:
> I draw to 24-bit RGB rowstrided image which I created with malloc.
> I update the drawing area with gdk_draw_rgb_image().
> The full update takes 80+ msec -- i.e., max frame rate is as low
> as 12 frames per second. Drawing to RGB image takes time as well,
> and so the frame rate drops too low. Image size is 900x600.

I'm not sure you can get much faster than that with plain gtk :-( have
you tried running:

gtk+-2.4.x/tests/testrgb

I get around 100 mega pixels per second draw speed for the fastest
case (2.5 Ghz xeon, nvidia graphics card), it should be able to do 900
x 600 at video rates pretty easily.

For more speed, I think you need to only update part of the display,
or to use another drawing technique. mplayer has a mode where it
decodes the video to an OpenGL texture, then uses an OGL window to
draw that on the screen. Of course if you do this, your user will not
be able to work over the network and will have to have OGL hardware
installed and woirking.

John
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: draw a 16bpp unindexed image on PC linux

2004-06-18 Thread Sven Neumann
Hi,

Juhana Sadeharju <[EMAIL PROTECTED]> writes:

> The full update takes 80+ msec -- i.e., max frame rate is as low
> as 12 frames per second. Drawing to RGB image takes time as well,
> and so the frame rate drops too low. Image size is 900x600.

I don't think you can expect a higher frame rate from a client-server
infrastructure such as X windows. You will have to use an X extension
to transfer the data more directly to the graphics card.


Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Compile of gtk243 on cygwin fails at configure

2004-06-18 Thread Jean Bréfort
Le ven 18/06/2004 Ã 00:29, Guy Stalnaker a Ãcrit :
> Hi,
> 
> Odd situation here.  Running cygwin 1.5x.  Pango compiles and installs 
> successfully.  atk compiles and installs successfully.  glib compiles 
> and installs successfully.  I used --prefix=/usr for all of them.  gtk+ 
> fails on the configure pass however with an error:
> 
> 
> configure:29908: error:
> *** Cannot link to Accessibility Toolkit.  Accessibility Toolkit is required
> *** to build GTK+
> 
> 
> You know, of course, that atk is installed and there were no errors when 
> 'make install' was run. The atk.pc file is in /usr/lib/pkgconfig and in 
> /lib/pkgconfig and it contains:
> 
> 
> prefix=/usr
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> 
> Name: Atk
> Description: Accessibility Toolkit
> Version: 1.6.0
> Requires: gobject-2.0 gmodule-2.0
> Libs: -L${libdir} -latk-1.0
> Cflags: -I${includedir}/atk-1.0
> 
> 
> And /usr/lib shows:
> 
> libatk-1.0.1
> litatk-1.0.la
> 
> 
> /usr/include/atk-1.0/atk exists and has the requisite .h files in it.
> 
> Any ideas?  Seems odd that glib, pango, and atk all compile and install 
> without error but that gtk+, which finds glib and pango just fine, then 
> fails to find atk.
> 

What is the corresponding error message in config.log?


signature.asc
Description: Ceci est une partie de message	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: On Click event for an image

2004-06-18 Thread Juhana Sadeharju
>From: Russell Shaw <[EMAIL PROTECTED]>
>
>Chris W wrote:
>> I am thinking that the best way to get the look I want for the 
>> calculator simulator I want to create is to have one graphic for 
>> keyboard.  So I need to respond to clicks and then know where on the 
>> image they clicked so I can then figure out what button is at that 
>> point.How do you do that?
>
>Read the button-press coordinates from a GtkDrawingArea that has a
>picture of the keypad on it. You'll need to manually define where
>the hot areas for each button lie.

Have another image of the same size than the calculator keyboard
image. Code the number and operation keys to color codes. Get the
coordinates from GtkDrawingArea and check the color code from the
another image. Convert the color code to key.

If you make the keyboard image with image manipulation software
(like GIMP), it should be easy to select the color codes and
paint over the keys. Select the colors numerically. You may
check the color numbers from the ascii table.

Juhana
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: draw a 16bpp unindexed image on PC linux

2004-06-18 Thread Juhana Sadeharju
>From: John Cupitt <[EMAIL PROTECTED]>
>
>http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/index.html
>
>you keep the image in memory as a 24 bit RGB and it will render
>it to any display device for you (8, 16, 24, 32 bit etc.). Is that
>what you need?

The demo looks great.

I wrote a software with GTK 1.*, but now I changed to GTK 2.0.
I did not change any code and I'm not sure should I change.

I draw to 24-bit RGB rowstrided image which I created with malloc.
I update the drawing area with gdk_draw_rgb_image().
The full update takes 80+ msec -- i.e., max frame rate is as low
as 12 frames per second. Drawing to RGB image takes time as well,
and so the frame rate drops too low. Image size is 900x600.

When little objects moves in the image, the update is not
a problem. How to get the full update faster? Are RGB images
wrong choise for that?

Is it wise to draw lines to RGB image by drawing to drawable
and copying the content to pixbuf? I would not want re-write
drawing routines? Should I use some other drawing library?
gegl? libart? svg something? OpenGL?

Juhana
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Compile of gtk243 on cygwin fails at configure

2004-06-18 Thread Guy Stalnaker
Hi,
Odd situation here.  Running cygwin 1.5x.  Pango compiles and installs 
successfully.  atk compiles and installs successfully.  glib compiles 
and installs successfully.  I used --prefix=/usr for all of them.  gtk+ 
fails on the configure pass however with an error:


configure:29908: error:
*** Cannot link to Accessibility Toolkit.  Accessibility Toolkit is required
*** to build GTK+

You know, of course, that atk is installed and there were no errors when 
'make install' was run. The atk.pc file is in /usr/lib/pkgconfig and in 
/lib/pkgconfig and it contains:


prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Atk
Description: Accessibility Toolkit
Version: 1.6.0
Requires: gobject-2.0 gmodule-2.0
Libs: -L${libdir} -latk-1.0
Cflags: -I${includedir}/atk-1.0

And /usr/lib shows:

libatk-1.0.1
litatk-1.0.la

/usr/include/atk-1.0/atk exists and has the requisite .h files in it.
Any ideas?  Seems odd that glib, pango, and atk all compile and install 
without error but that gtk+, which finds glib and pango just fine, then 
fails to find atk.

Regards,
Guy S.
--
Guy Stalnaker
[EMAIL PROTECTED]
1210 West Dayton Street
Room 3209 CSS
Madison WI 53719-1220
[EMAIL PROTECTED]
wk. 608.263.8035
cell 608.235.4718
fax 608.265.6681
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


How to create a scrolled text window with GTK 2.x?

2004-06-18 Thread Juha Nieminen

  In GTK 1.x I could say this:

GtkWidget* textWindow = gtk_text_new(0, 0);
GtkWidget* scrollBar = gtk_vscrollbar_new(GTK_TEXT(textWindow)->vadj);

GtkWidget* hBox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hBox), textWindow, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hBox), scrollBar, FALSE, TRUE, 0);

  This created a nice scrolled text window which always scrolled to the
end when new text appeared at the end of the text window. This is exactly
the behaviour I want in an application I'm currently developing.

  However, I'm using GTK 2.x, and the above code is deprecated, and I'm
unable to get the same behaviour with the new version of the library. I have
been reading the API reference all over, but I don't get it.

  I have tried a similar code with the new GtkTextView widget, like this:

GtkWidget* textWindow = gtk_text_view_new();
GtkWidget* textWindowScrollBar =
gtk_vscrollbar_new(GTK_TEXT_VIEW(textWindow)->vadjustment);

GtkWidget* hBox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hBox), textWindow, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hBox), textWindowScrollBar, FALSE, TRUE, 0);

  However, this doesn't work. The scrollbar is completely non-functional
(and taking textWindow->vadjustment is probably non-standard as well).

  I have also tried this:

GtkWidget* textWindow = gtk_text_view_new();
GtkWidget* scrolledTextWindow = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledTextWindow),
   GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_add_with_viewport
(GTK_SCROLLED_WINDOW(scrolledTextWindow), textWindow);

  However, this doesn't work like I want: It does not automatically scroll
to the end when new text appears at the end of the text window.

  How can I get the same type of scrolling text window as in GTK 1.x?


  And by the way, another question:

  For example the GtkPaned widget is specified to throw eg. a signal
called "accept-position". However, if I create eg. a GtkVPaned and
connect this signal to a function, like this:

g_signal_connect(G_OBJECT(mainPanedWindow), "accept-position",
 G_CALLBACK(mainPanedWindowResize), NULL);

nothing happens. The mainPanedWindowResize() function is never called.

  GTK is accepting this signal connection (because if I put an invalid
signal name in the string, GTK prints an error message at runtime, but
with "accept-position" it doesn't).

  The same holds for all the other signals GtkPaned is documented to throw
(eg. "move-handle" etc). Even if I connect the signal with a function, the
function is never called.

  To do what I wanted I had to connect the "size-allocate" signal thrown
by GtkWidget, and that worked (even though the function is called more
often than I would really want). But why doesn't connecting "accept-position"
work?

- Juha Nieminen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to put image as background of window

2004-06-18 Thread srinivas
Hai all , iam very new to gtk.
actually i want to paint (not exactly paint but lay another image) part
of the image at runtime.
like a constant background with changing images at fixed position.
i need all of your guidance, presently iam using gtk1.2 and iam restricted
to use it.
you guidance will be of greate help.

Thanks in advance,
Regards
cnu Taiwan


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list