URI: 
       tgtktypes.h - vaccinewars - be a doctor and try to vaccinate the world
  HTML git clone git://src.adamsgaard.dk/vaccinewars
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       tgtktypes.h (4866B)
       ---
            1 /************************************************************************
            2  * gtktypes.h     Custom types for gtkport code                         *
            3  * Copyright (C)  2002-2021  Ben Webb                                   *
            4  *                Email: benwebb@users.sf.net                           *
            5  *                WWW: https://dopewars.sourceforge.io/                 *
            6  *                                                                      *
            7  * This program is free software; you can redistribute it and/or        *
            8  * modify it under the terms of the GNU General Public License          *
            9  * as published by the Free Software Foundation; either version 2       *
           10  * of the License, or (at your option) any later version.               *
           11  *                                                                      *
           12  * This program is distributed in the hope that it will be useful,      *
           13  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
           14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
           15  * GNU General Public License for more details.                         *
           16  *                                                                      *
           17  * You should have received a copy of the GNU General Public License    *
           18  * along with this program; if not, write to the Free Software          *
           19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,               *
           20  *                   MA  02111-1307, USA.                               *
           21  ************************************************************************/
           22 
           23 #ifndef __GTKTYPES_H__
           24 #define __GTKTYPES_H__
           25 
           26 #ifdef HAVE_CONFIG_H
           27 #include <config.h>
           28 #endif
           29 
           30 #ifdef CYGWIN
           31 
           32 #define MB_IMMRETURN 0
           33 
           34 #define MYWM_SOCKETDATA (WM_USER+100)
           35 #define MYWM_TASKBAR    (WM_USER+101)
           36 #define MYWM_SERVICE    (WM_USER+102)
           37 
           38 #define GDK_MOD1_MASK 0
           39 
           40 extern HICON mainIcon;
           41 
           42 #define GDK_KEY_KP_0 0xFFB0
           43 #define GDK_KEY_KP_1 0xFFB1
           44 #define GDK_KEY_KP_2 0xFFB2
           45 #define GDK_KEY_KP_3 0xFFB3
           46 #define GDK_KEY_KP_4 0xFFB4
           47 #define GDK_KEY_KP_5 0xFFB5
           48 #define GDK_KEY_KP_6 0xFFB6
           49 #define GDK_KEY_KP_7 0xFFB7
           50 #define GDK_KEY_KP_8 0xFFB8
           51 #define GDK_KEY_KP_9 0xFFB9
           52 
           53 typedef gint (*GtkFunction) (gpointer data);
           54 typedef void (*GtkDestroyNotify) (gpointer data);
           55 
           56 typedef struct _GtkClass GtkClass;
           57 typedef struct _GObject GObject;
           58 
           59 typedef struct _GtkRequisition GtkRequisition;
           60 typedef struct _GtkAllocation GtkAllocation;
           61 typedef struct _GtkWidget GtkWidget;
           62 typedef struct _GtkSignalType GtkSignalType;
           63 typedef struct _GtkContainer GtkContainer;
           64 
           65 typedef void (*GCallback) ();
           66 typedef void (*GtkSignalMarshaller) (GObject *object, GSList *actions,
           67                                      GCallback default_action,
           68                                      va_list args);
           69 
           70 typedef struct _GdkColor GdkColor;
           71 typedef struct _GtkStyle GtkStyle;
           72 typedef struct _GtkMenuShell GtkMenuShell;
           73 typedef struct _GtkMenuBar GtkMenuBar;
           74 typedef struct _GtkMenuItem GtkMenuItem;
           75 typedef struct _GtkMenu GtkMenu;
           76 typedef struct _GtkAdjustment GtkAdjustment;
           77 typedef struct _GtkSeparator GtkSeparator;
           78 typedef struct _GtkMisc GtkMisc;
           79 typedef struct _GtkProgressBar GtkProgressBar;
           80 typedef struct _GtkHSeparator GtkHSeparator;
           81 typedef struct _GtkVSeparator GtkVSeparator;
           82 typedef struct _GtkAccelGroup GtkAccelGroup;
           83 typedef struct _GtkPanedChild GtkPanedChild;
           84 typedef struct _GtkPaned GtkPaned;
           85 typedef struct _GtkVPaned GtkVPaned;
           86 typedef struct _GtkHPaned GtkHPaned;
           87 typedef struct _GtkComboBox GtkComboBox;
           88 
           89 /* Currently we only use cell_layout for combo box, so make it a synonym */
           90 typedef struct _GtkComboBox GtkCellLayout;
           91 
           92 struct _GtkAccelGroup {
           93   ACCEL *accel;                 /* list of ACCEL structures */
           94   gint numaccel;
           95 };
           96 
           97 struct _GtkSignalType {
           98   gchar *name;
           99   GtkSignalMarshaller marshaller;
          100   GCallback default_action;
          101 };
          102 
          103 struct _GdkColor {
          104   gulong  pixel;
          105   gushort red;
          106   gushort green;
          107   gushort blue;
          108 };
          109 
          110 struct _GtkStyle {
          111   GdkColor fg[5];
          112   GdkColor bg[5];
          113 };
          114 
          115 typedef gboolean (*GtkWndProc) (GtkWidget *widget, UINT msg,
          116                                 WPARAM wParam, LPARAM lParam, gboolean *dodef);
          117 
          118 struct _GtkClass {
          119   gchar *Name;
          120   GtkClass *parent;
          121   gint Size;
          122   GtkSignalType *signals;
          123   GtkWndProc wndproc;
          124 };
          125 
          126 typedef GtkClass *GtkType;
          127 
          128 struct _GObject {
          129   GtkClass *klass;
          130   GData *object_data;
          131   GData *signals;
          132   guint32 flags;
          133 };
          134 
          135 struct _GtkAdjustment {
          136   GObject object;
          137   gfloat value, lower, upper;
          138   gfloat step_increment, page_increment, page_size;
          139 };
          140 
          141 struct _GtkRequisition {
          142   gint16 width, height;
          143 };
          144 
          145 struct _GtkAllocation {
          146   gint16 x, y, width, height;
          147 };
          148 
          149 struct _GtkWidget {
          150   GObject object;
          151   HWND hWnd;
          152   GtkRequisition requisition;
          153   GtkAllocation allocation;
          154   GtkRequisition usize;
          155   GtkWidget *parent;
          156 };
          157 
          158 struct _GtkContainer {
          159   GtkWidget widget;
          160   GtkWidget *child;
          161   guint border_width:16;
          162 };
          163 
          164 #endif /* CYGWIN */
          165 
          166 #endif /* __GTKTYPES_H__ */