This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUMBER add (NUMBER a, NUMBER b) | |
{ | |
int i; | |
int carry; | |
int aux; | |
int vec[MAX]; | |
NUMBER result; | |
if (a.length <= b.length) | |
aux = b.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS = -Wall -g `pkg-config --cflags gtk+-2.0` | |
LDFLAGS = `pkg-config --libs gtk+-2.0` | |
enter_and_leave_signals_demo: enter_and_leave_signals_demo.c | |
$(CC) -o enter_and_leave_signals_demo enter_and_leave_signals_demo.c $(CFLAGS) $(LDFLAGS) | |
clean: | |
rm -f *~ | |
rm -f *.o | |
rm -f enter_and_leave_signals_demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS = -Wall -g `pkg-config --cflags gtk+-2.0` | |
LDFLAGS = `pkg-config --libs gtk+-2.0` | |
grid_test: grid_test.c | |
$(CC) -o grid_test grid_test.c $(CFLAGS) $(LDFLAGS) | |
clean: | |
rm -f *~ | |
rm -f *.o | |
rm -f grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.o | |
*~ | |
command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* \file gtk_entry_insert_text_comment.c | |
* \brief | |
* | |
* The algorithms here will work as long as the text size (a | |
* multiple of 2), fits into a guint16. We specify a shorter | |
* maximum length so that if the user pastes a very long text, there | |
* is not a long hang from the slow X_LOCALE functions. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use at your own risk. | |
Requires: | |
gtk+-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* \file mysql_text_entry.c | |
* \brief | |
*/ | |
#include <gtk/gtk.h> | |
#include <glib.h> | |
#include <stdio.h> | |
#include <mysql/mysql.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
width = DrawingArea->allocation.width; | |
height = DrawingArea->allocation.height; | |
rgbbuf = malloc (width * height * 3); | |
memset (rgbbuf, 240, width * height * 3); // set the background to GREY = (240, 240, 240) | |
//DrawBufferImage (rgbbuf, width, height, data); | |
gdk_draw_rgb_image (pixmap, | |
DrawingArea->style->fg_gc[GTK_STATE_NORMAL], | |
0, 0, width, height, GDK_RGB_DITHER_NONE, rgbbuf, width*3); | |
free (rgbbuf); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* \file gtk_and_glade_test.c | |
* \brief | |
* | |
* How to use glade_new in gtk-win32 | |
* You have to link with the libraries you use, particularly -lglade-2.0 here. | |
* But since you use gcc, I suppose pkg-config would work for you, | |
* and therefore stop guessing what to put on the gcc command line and use | |
* pkg-config. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* \file get_startup_time.c | |
* \brief | |
*/ | |
#include <glib.h> | |
int |
OlderNewer