summaryrefslogtreecommitdiff
path: root/iup/src/gtk/iupgtk_drv.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/src/gtk/iupgtk_drv.h
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/src/gtk/iupgtk_drv.h')
-rwxr-xr-xiup/src/gtk/iupgtk_drv.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/iup/src/gtk/iupgtk_drv.h b/iup/src/gtk/iupgtk_drv.h
new file mode 100755
index 0000000..ade2a4a
--- /dev/null
+++ b/iup/src/gtk/iupgtk_drv.h
@@ -0,0 +1,82 @@
+/** \file
+ * \brief GTK Driver
+ *
+ * See Copyright Notice in "iup.h"
+ */
+
+#ifndef __IUPGTK_DRV_H
+#define __IUPGTK_DRV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* global variables, declared in iupgtk_globalattrib.c */
+extern int iupgtk_utf8autoconvert;
+
+
+/* common */
+gboolean iupgtkEnterLeaveEvent(GtkWidget *widget, GdkEventCrossing *evt, Ihandle* ih);
+gboolean iupgtkShowHelp(GtkWidget *widget, GtkWidgetHelpType *arg1, Ihandle* ih);
+GtkFixed* iupgtkBaseGetFixed(Ihandle* ih);
+void iupgtkBaseAddToParent(Ihandle* ih);
+void iupgdkColorSet(GdkColor* color, unsigned char r, unsigned char g, unsigned char b);
+int iupgtkSetDragDropAttrib(Ihandle* ih, const char* value);
+int iupgtkSetMnemonicTitle(Ihandle* ih, GtkLabel* label, const char* value);
+char* iupgtkStrConvertToUTF8(const char* str);
+char* iupgtkStrConvertFromUTF8(const char* str);
+void iupgtkReleaseConvertUTF8(void);
+char* iupgtkStrConvertFromFilename(const char* str);
+char* iupgtkStrConvertToFilename(const char* str);
+void iupgtkUpdateMnemonic(Ihandle* ih);
+gboolean iupgtkMotionNotifyEvent(GtkWidget *widget, GdkEventMotion *evt, Ihandle *ih);
+gboolean iupgtkButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih);
+void iupgtkBaseSetBgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b);
+void iupgtkBaseSetFgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b);
+void iupgtkBaseSetFgGdkColor(InativeHandle* handle, GdkColor *color);
+
+
+/* focus */
+gboolean iupgtkFocusInOutEvent(GtkWidget *widget, GdkEventFocus *evt, Ihandle* ih);
+
+
+/* key */
+gboolean iupgtkKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih);
+gboolean iupgtkKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih);
+void iupgtkButtonKeySetStatus(guint state, unsigned int but, char* status, int doubleclick);
+void iupgtkKeyEncode(int key, guint *keyval, guint *state);
+
+
+/* font */
+char* iupgtkGetPangoFontDescAttrib(Ihandle *ih);
+char* iupgtkGetFontIdAttrib(Ihandle *ih);
+PangoFontDescription* iupgtkGetPangoFontDesc(const char* value);
+char* iupgtkFindPangoFontDesc(PangoFontDescription* fontdesc);
+void iupgtkFontUpdatePangoLayout(Ihandle* ih, PangoLayout* layout);
+void iupgtkFontUpdateObjectPangoLayout(Ihandle* ih, gpointer object);
+
+/* There are PANGO_SCALE Pango units in one device unit.
+ For an output backend where a device unit is a pixel,
+ a size value of 10 * PANGO_SCALE gives 10 pixels. */
+#define IUPGTK_PANGOUNITS2PIXELS(_x) (((_x) + PANGO_SCALE/2) / PANGO_SCALE)
+#define IUPGTK_PIXELS2PANGOUNITS(_x) ((_x) * PANGO_SCALE)
+
+
+/* open */
+char* iupgtkGetNativeWindowHandle(Ihandle* ih);
+void iupgtkPushVisualAndColormap(void* visual, void* colormap);
+void* iupgtkGetNativeGraphicsContext(GtkWidget* widget);
+void iupgtkReleaseNativeGraphicsContext(GtkWidget* widget, void* gc);
+void iupgtkUpdateGlobalColors(GtkStyle* style);
+
+
+/* dialog */
+gboolean iupgtkDialogDeleteEvent(GtkWidget *widget, GdkEvent *evt, Ihandle *ih);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif