Blame gtk/gtkwin32embed.h

Packit Service fb6fa5
/* GTK - The GIMP Toolkit
Packit Service fb6fa5
 * gtkwin32embed.h: Utilities for Win32 embedding
Packit Service fb6fa5
 * Copyright (C) 2005, Novell, Inc.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * This library is free software; you can redistribute it and/or
Packit Service fb6fa5
 * modify it under the terms of the GNU Lesser General Public
Packit Service fb6fa5
 * License as published by the Free Software Foundation; either
Packit Service fb6fa5
 * version 2 of the License, or (at your option) any later version.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * This library is distributed in the hope that it will be useful,
Packit Service fb6fa5
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fb6fa5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service fb6fa5
 * Lesser General Public License for more details.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * You should have received a copy of the GNU Lesser General Public
Packit Service fb6fa5
 * License along with this library; if not, write to the
Packit Service fb6fa5
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit Service fb6fa5
 * Boston, MA 02111-1307, USA.
Packit Service fb6fa5
 */
Packit Service fb6fa5
Packit Service fb6fa5
/* By Tor Lillqvist <tml@novell.com> 2005 */
Packit Service fb6fa5
Packit Service fb6fa5
#ifndef __GTK_WIN32_EMBED_H__
Packit Service fb6fa5
#define __GTK_WIN32_EMBED_H__
Packit Service fb6fa5
Packit Service fb6fa5
G_BEGIN_DECLS
Packit Service fb6fa5
Packit Service fb6fa5
#define GTK_WIN32_EMBED_PROTOCOL_VERSION 1
Packit Service fb6fa5
Packit Service fb6fa5
/*
Packit Service fb6fa5
 * When the plug and socket are in separate processes they use a
Packit Service fb6fa5
 * simple protocol, more or less based on XEMBED. The protocol uses
Packit Service fb6fa5
 * registered window messages. The name passed to
Packit Service fb6fa5
 * RegisterWindowMessage() is gtk-win32-embed:%d, with %d being the
Packit Service fb6fa5
 * numeric value of an GtkWin32EmbedMessageType enum. Each message
Packit Service fb6fa5
 * carries the message type enum value and two integers, the "wparam"
Packit Service fb6fa5
 * and "lparam", like all window messages.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * So far all the window messages are posted to the other
Packit Service fb6fa5
 * process. Maybe some later enhancement will add also messages that
Packit Service fb6fa5
 * are sent, i.e. where the sending process waits for the receiving
Packit Service fb6fa5
 * process's window procedure to handle the message.
Packit Service fb6fa5
 */
Packit Service fb6fa5
Packit Service fb6fa5
typedef enum {					/* send or post? */
Packit Service fb6fa5
  /* First those sent from the socket
Packit Service fb6fa5
   * to the plug
Packit Service fb6fa5
   */
Packit Service fb6fa5
  GTK_WIN32_EMBED_WINDOW_ACTIVATE,		/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_WINDOW_DEACTIVATE,		/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_FOCUS_IN,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_FOCUS_OUT,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_MODALITY_ON,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_MODALITY_OFF,			/* post */
Packit Service fb6fa5
Packit Service fb6fa5
  /* Then the ones sent from the plug
Packit Service fb6fa5
   * to the socket.
Packit Service fb6fa5
   */
Packit Service fb6fa5
  GTK_WIN32_EMBED_PARENT_NOTIFY,		/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_EVENT_PLUG_MAPPED,		/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_PLUG_RESIZED,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_REQUEST_FOCUS,		/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_FOCUS_NEXT,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_FOCUS_PREV,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_GRAB_KEY,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_UNGRAB_KEY,			/* post */
Packit Service fb6fa5
  GTK_WIN32_EMBED_LAST
Packit Service fb6fa5
} GtkWin32EmbedMessageType;
Packit Service fb6fa5
Packit Service fb6fa5
/* wParam values for GTK_WIN32_EMBED_FOCUS_IN: */
Packit Service fb6fa5
#define GTK_WIN32_EMBED_FOCUS_CURRENT 0
Packit Service fb6fa5
#define GTK_WIN32_EMBED_FOCUS_FIRST 1
Packit Service fb6fa5
#define GTK_WIN32_EMBED_FOCUS_LAST 2
Packit Service fb6fa5
Packit Service fb6fa5
/* Flags for lParam in GTK_WIN32_EMBED_FOCUS_IN, GTK_WIN32_EMBED_FOCUS_NEXT,
Packit Service fb6fa5
 * GTK_WIN32_EMBED_FOCUS_PREV
Packit Service fb6fa5
 */
Packit Service fb6fa5
#define GTK_WIN32_EMBED_FOCUS_WRAPAROUND         (1 << 0)
Packit Service fb6fa5
Packit Service fb6fa5
guint _gtk_win32_embed_message_type (GtkWin32EmbedMessageType type);
Packit Service fb6fa5
void _gtk_win32_embed_push_message (MSG *msg);
Packit Service fb6fa5
void _gtk_win32_embed_pop_message (void);
Packit Service fb6fa5
void _gtk_win32_embed_send (GdkWindow		    *recipient,
Packit Service fb6fa5
			    GtkWin32EmbedMessageType message,
Packit Service fb6fa5
			    WPARAM		     wparam,
Packit Service fb6fa5
			    LPARAM                   lparam);
Packit Service fb6fa5
void _gtk_win32_embed_send_focus_message (GdkWindow		  *recipient,
Packit Service fb6fa5
					  GtkWin32EmbedMessageType message,
Packit Service fb6fa5
					  WPARAM	           wparam);
Packit Service fb6fa5
void     _gtk_win32_embed_set_focus_wrapped  (void);
Packit Service fb6fa5
gboolean _gtk_win32_embed_get_focus_wrapped  (void);
Packit Service fb6fa5
Packit Service fb6fa5
G_END_DECLS
Packit Service fb6fa5
Packit Service fb6fa5
#endif /*  __GTK_WIN32_EMBED_H__ */