Re: drawing area and button press event

2005-08-12 Thread Michal Porzuczek
On 8/12/05, Yiannis <[EMAIL PROTECTED]> wrote: > Hi, > > my callback on the button press event seems not to be called... in > fact I am not sure if a button press event occurs. Find below a simple > program (using glade/libglade) that makes a drawing area and a 2 > callbacks... The expose event an

Re: extracting a portion of a GdkPixmap

2005-08-09 Thread Michal Porzuczek
On 8/9/05, Boncek, John <[EMAIL PROTECTED]> wrote: > Thanks to those who replied. gdk_draw_drawable is working. I know you > have to unref certain kinds of objects. Do you have to unref a GdkPixmap > when finished with it? Yes you should ___ gtk-app-d

Bayer Pattern images in Pixbuf or Pixmaps

2005-08-09 Thread Michal Porzuczek
Hi I was wondering if Pixmaps or Pixbufs support Bayer Pattern data and if not if there is a simple conversion technique to get a Bayer Pattern image into an RGB or other image format that could be used properly by a Pixbuf or Pixmap. Thanks a lot, Michal

Question about GtkFileChooserDialog

2005-07-26 Thread Michal Porzuczek
Hi, When using the GtkFileChooserDialog, is there a way to get the number of files in the folder you select or when saving check if the file you select already exists in the folder or dosen't in the case of opening? Thanks a lot, Michal ___ gtk-app-dev

Changing where the max/min values are on Scale Widgets

2005-07-18 Thread Michal Porzuczek
Hi, When you create a gtk_hscale the lower limit is automatically at the top and upper limit at the bottom is there a way of changing this? I have tried just changing the upper and lower values but this does not work properly, I have also tried putting negative page increments but this also didn't

variables in g_signal_connect

2005-07-14 Thread Michal Porzuczek
When connecting signals to methods is is possible to add additional variables to the signals and if so in which way. Furthermore, the 4th variable, data, does it have to be a gpointer? I have the following function defined as: Horizontal_Zoom_In_clicked(GtkWidget *widget, int gt) and the signal

Disabling Button/Window focus

2005-07-12 Thread Michal Porzuczek
Hi, I was wondering if it is possible to temporary disable focus on buttons so they don't work and they do not light up when the mouse hovers over them. Is it also possible to disable the movement and resizeablilty of a window temporariliy. Furthermore, is it possible to set where we want a win

Re: Re: [gdk] How use gdk-pixbuf...

2005-07-08 Thread Michal Porzuczek
> GdkPixmap *pixmap; > GdkPixbuf *pixbuf; > GdkGC *gc; > pixbuf = > pixmap = gdk_pixbuf_new(NULL, > gdk_pixbuf_get_width(pixbuf), > gdk_pixbuf_get_height(pixbuf), >

Re: [gdk] How use gdk-pixbuf...

2005-07-07 Thread Michal Porzuczek
> I know some of glib/gtk+ and I'd like to use similar library. > How to get GdkDrawable from GdkPixbuf? Use gdk_draw_pixbuf () to convert from GdkPixbuf to GdkDrawable. > - Create new image > - Insert into it some text, lines ect. > - Insert into it some pictures from disk > - Save it on disk

Re: how can I show an image in the main window's drawing area?

2005-07-06 Thread Michal Porzuczek
> after clicked on the file_chooser_dialog's ok button, How can I manipulate > the widget in the main window to show the selected RGB file while in the > callback function? I'm not sure if this is what you need, but what you should do is create an expose_event signal for the drawing area where y

sensing window destruction

2005-06-30 Thread Michal Porzuczek
Hi, I was wondering how it is possible to sense when a widget is closed by the user and send change a specific variable as a result. Furthermore, is there a way other then gtk_widget_destroy to destroy/close widget windows because this causes seg faults for me in some occasions and in others dose

Question about gtk_text_buffer_insert

2005-06-20 Thread Michal Porzuczek
Hi, When using gtk_text_buffer_insert on a GtkTextView widget that is open at the same time as I edit the textView's buffer can this be responsible for a Seg Fault and or a pretty dramatic decrease in CPU performance? Is there an alternative? Michal ___

Saving RGB or Grayscale images from GdkPixBuf

2005-06-17 Thread Michal Porzuczek
Hi I was wondering if gdk_pixbuf_save supports saving RGB or Grayscale images. I have attempted to use the add_if_writiable function that is specified in the api reference but I just get gibberish so I don't think I'm doing it right. I have tried to save RGBs by making the type "RGB"but not know

Acquring RGB values from GdkPixbuf

2005-06-15 Thread Michal Porzuczek
Hi, I am getting RGB videofeed from a camera and I am storing it in a PixBuf, from this PixBuf I wish to be able to acquire the shade (grayscale) value of pixels located at a particular x and y location. I have looked at the put_pixel() example in the API reference http://www.gtk.org/api/2.6/gdk-

Callback signals for Custom Widgets

2005-06-13 Thread Michal Porzuczek
Hi, I have created my own custom widget, and I was wondering how I can link or map GDK event types to my custom widget in particular the key_press_event and button_press_event. Furthermore, after a event type has been specified, say the button_press_event, will I have to actually specify what but

Clarification about gtk_main() and running simultaneous non-gtk functions

2005-06-06 Thread Michal Porzuczek
Correct me if I'm wrong but the gtk_main() acts like an infinite while loop that waits for callbacks to the widgets that have been created before gtk_main() was called. My question is, except for the g_timer function which seems to just be for measuring proccesses inside actual callbacks, is it po

How to deal with a possible Memory Leak when using GdkPixMap

2005-06-02 Thread Michal Porzuczek
Hi, I have written a program pretty much by re-adjusting the scribble example from the GTK Tutorial, instead of creating my own PixMap in the configure_event I called the following function which creates a pixmap from file: GdkPixmap* gdk_pixmap_new_from_file( const char *filename ) { Gdk

Images in the Drawing Area

2005-06-01 Thread Michal Porzuczek
Hi, I was wondering whether or not it is possible to display a .jpeg, .png or .bmp in the drawing area and then be able to draw lines over this image. If this is possible, what functions can I use in order to get the image from file and then be able to display the image in the drawing area. Thank

State changing of Toggle Buttons

2005-05-30 Thread Michal Porzuczek
Hi, I was wondering if it is possible to set a Toggle Button's state to something else when you are inside another Toogle Button's callback. I know there is the gtk_toggle_button_set_active method but that requires you to have the GtkToggleButton. Is there another method that only uses the Widget

Questions about Overlay and multiple key-strokes

2005-05-27 Thread Michal Porzuczek
Hi, I have a couple of questions. Question 1. Is it possible to have an image (Jpeg) displayed and have a drawing area overlayed on top but still be able to view the image below it. If a drawing area is not allowed, is it possible to put something that resembles a drawing area over an image where