ok fix some things with SSL and ecore_evas. you ALWYAs have at least the api
to do ssl and al fo ecorE_evas stuff BUt ecore_* may not be BUILT with that support so the api stub exists but it may just return NULL. theres calls to query for support here. SVN revision: 11957
This commit is contained in:
parent
0e38160623
commit
acfe995563
|
@ -648,11 +648,8 @@ src/lib/ecore/Makefile
|
||||||
src/lib/ecore_job/Makefile
|
src/lib/ecore_job/Makefile
|
||||||
src/lib/ecore_x/Makefile
|
src/lib/ecore_x/Makefile
|
||||||
src/lib/ecore_fb/Makefile
|
src/lib/ecore_fb/Makefile
|
||||||
src/lib/ecore_evas/Ecore_Evas.h
|
|
||||||
src/lib/ecore_evas/Makefile
|
src/lib/ecore_evas/Makefile
|
||||||
src/lib/ecore_con/Ecore_Con.h
|
|
||||||
src/lib/ecore_con/Makefile
|
src/lib/ecore_con/Makefile
|
||||||
src/lib/ecore_ipc/Ecore_Ipc.h
|
|
||||||
src/lib/ecore_ipc/Makefile
|
src/lib/ecore_ipc/Makefile
|
||||||
src/lib/ecore_txt/Makefile
|
src/lib/ecore_txt/Makefile
|
||||||
src/lib/ecore_config/Makefile
|
src/lib/ecore_config/Makefile
|
||||||
|
|
|
@ -89,8 +89,6 @@ $(ECORE_IPC_LIB) \
|
||||||
$(ECORE_TXT_LIB) \
|
$(ECORE_TXT_LIB) \
|
||||||
-lm @iconv_libs@
|
-lm @iconv_libs@
|
||||||
|
|
||||||
#ecore_test_LDFLAGS =
|
|
||||||
|
|
||||||
ecore_test_CFLAGS = \
|
ecore_test_CFLAGS = \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
$(INCLUDES)
|
$(INCLUDES)
|
||||||
|
@ -123,8 +121,6 @@ $(ECORE_IPC_LIB) \
|
||||||
$(ECORE_TXT_LIB) \
|
$(ECORE_TXT_LIB) \
|
||||||
-lm @iconv_libs@
|
-lm @iconv_libs@
|
||||||
|
|
||||||
#ecore_evas_test_LDFLAGS =
|
|
||||||
|
|
||||||
ecore_evas_test_CFLAGS = \
|
ecore_evas_test_CFLAGS = \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
$(INCLUDES)
|
$(INCLUDES)
|
||||||
|
|
|
@ -31,4 +31,4 @@ ecore_value.c \
|
||||||
ecore_private.h
|
ecore_private.h
|
||||||
|
|
||||||
libecore_la_LIBADD = -lm @dlopen_libs@ @winsock_libs@
|
libecore_la_LIBADD = -lm @dlopen_libs@ @winsock_libs@
|
||||||
libecore_la_LDFLAGS = -version-info 1:0:0
|
libecore_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0
|
||||||
|
|
|
@ -33,12 +33,6 @@
|
||||||
* @li @ref Ecore_Con_Client_Group
|
* @li @ref Ecore_Con_Client_Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HAVE_ECORE_CON_OPENSSL @USE_OPENSSL@
|
|
||||||
|
|
||||||
#if HAVE_ECORE_CON_OPENSSL
|
|
||||||
#include <openssl/ssl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,10 +45,8 @@ extern "C" {
|
||||||
{
|
{
|
||||||
ECORE_CON_LOCAL_USER,
|
ECORE_CON_LOCAL_USER,
|
||||||
ECORE_CON_LOCAL_SYSTEM,
|
ECORE_CON_LOCAL_SYSTEM,
|
||||||
ECORE_CON_REMOTE_SYSTEM
|
ECORE_CON_REMOTE_SYSTEM,
|
||||||
#if HAVE_ECORE_CON_OPENSSL
|
ECORE_CON_USE_SSL = 16
|
||||||
,ECORE_CON_USE_SSL = 16
|
|
||||||
#endif
|
|
||||||
} Ecore_Con_Type;
|
} Ecore_Con_Type;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,6 +116,9 @@ extern "C" {
|
||||||
void ecore_con_client_data_set(Ecore_Con_Client *cl, const void *data);
|
void ecore_con_client_data_set(Ecore_Con_Client *cl, const void *data);
|
||||||
void *ecore_con_client_data_get(Ecore_Con_Client *cl);
|
void *ecore_con_client_data_get(Ecore_Con_Client *cl);
|
||||||
|
|
||||||
|
int ecore_con_ssl_available_get(void);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
|
@ -1,13 +1,13 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/src/lib/ecore \
|
|
||||||
-I$(top_srcdir)/src/lib/ecore_con \
|
|
||||||
-I$(top_builddir)/src/lib/ecore \
|
-I$(top_builddir)/src/lib/ecore \
|
||||||
-I$(top_builddir)/src/lib/ecore_con \
|
-I$(top_builddir)/src/lib/ecore_con \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_con \
|
||||||
@SSL_CFLAGS@
|
@SSL_CFLAGS@
|
||||||
|
|
||||||
libecore_con_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_con_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
|
||||||
if BUILD_ECORE_CON
|
if BUILD_ECORE_CON
|
||||||
|
@ -30,6 +30,5 @@ $(top_builddir)/src/lib/ecore/libecore.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
Ecore_Con.h.in \
|
|
||||||
ecore_con.c \
|
ecore_con.c \
|
||||||
ecore_con_private.h
|
ecore_con_private.h
|
||||||
|
|
|
@ -725,6 +725,21 @@ ecore_con_client_data_get(Ecore_Con_Client *cl)
|
||||||
return cl->data;
|
return cl->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if SSL support is available
|
||||||
|
* @return 1 if SSL is available, 0 if it is not.
|
||||||
|
* @ingroup Ecore_Con_Client_Group
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
ecore_con_ssl_available_get(void)
|
||||||
|
{
|
||||||
|
#if USE_OPENSSL
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_con_server_free(Ecore_Con_Server *svr)
|
_ecore_con_server_free(Ecore_Con_Server *svr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,10 +11,10 @@ INCLUDES = \
|
||||||
|
|
||||||
CLEANFILES = $(DB)
|
CLEANFILES = $(DB)
|
||||||
|
|
||||||
libecore_config_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_config_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
|
||||||
ecore_config_ipc_ecore_la_LDFLAGS = -no-undefined -module \
|
ecore_config_ipc_ecore_la_LDFLAGS = $(LDFLAGS) -no-undefined -module \
|
||||||
-avoid-version -rdynamic -shared
|
-avoid-version -rdynamic -shared
|
||||||
|
|
||||||
if BUILD_ECORE_CONFIG
|
if BUILD_ECORE_CONFIG
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
#ifndef _ECORE_EVAS_H
|
||||||
|
#define _ECORE_EVAS_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file Ecore_Evas.h
|
||||||
|
* @brief Evas wrapper functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* FIXME:
|
||||||
|
* to do soon:
|
||||||
|
* - iconfication api needs to work
|
||||||
|
* - maximization api nees to work
|
||||||
|
* - document all calls
|
||||||
|
*
|
||||||
|
* later:
|
||||||
|
* - buffer back-end that renders to an evas_image_object ???
|
||||||
|
* - qt back-end ???
|
||||||
|
* - dfb back-end ??? (dfb's threads make this REALLY HARD)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Evas.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* these are dummy and just tell u what API levels ecore_evas supports - not if
|
||||||
|
* the actual support is compiled in. you need to query for that separately.
|
||||||
|
*/
|
||||||
|
#define HAVE_ECORE_EVAS_X 1
|
||||||
|
#define HAVE_ECORE_EVAS_FB 1
|
||||||
|
#define HAVE_ECORE_EVAS_GL 1
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ECORE_EVAS_ENGINE_SOFTWARE_X11,
|
||||||
|
ECORE_EVAS_ENGINE_SOFTWARE_FB,
|
||||||
|
ECORE_EVAS_ENGINE_GL_X11
|
||||||
|
} Ecore_Evas_Engine_Type;
|
||||||
|
|
||||||
|
#ifndef _ECORE_X_H
|
||||||
|
#define _ECORE_X_WINDOW_PREDEF
|
||||||
|
typedef unsigned int Ecore_X_Window;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _ECORE_EVAS_PRIVATE_H
|
||||||
|
/* basic data types */
|
||||||
|
typedef void Ecore_Evas;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* module setup/shutdown calls */
|
||||||
|
|
||||||
|
int ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
|
||||||
|
|
||||||
|
int ecore_evas_init(void);
|
||||||
|
int ecore_evas_shutdown(void);
|
||||||
|
|
||||||
|
/* engine/target specific init calls */
|
||||||
|
Ecore_Evas *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
|
||||||
|
Ecore_X_Window ecore_evas_software_x11_window_get(Ecore_Evas *ee);
|
||||||
|
|
||||||
|
Ecore_Evas *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
|
||||||
|
Ecore_X_Window ecore_evas_gl_x11_window_get(Ecore_Evas *ee);
|
||||||
|
|
||||||
|
Ecore_Evas *ecore_evas_fb_new(char *disp_name, int rotation, int w, int h);
|
||||||
|
|
||||||
|
/* generic manipulation calls */
|
||||||
|
void ecore_evas_free(Ecore_Evas *ee);
|
||||||
|
void *ecore_evas_data_get(Ecore_Evas *ee, const char *key);
|
||||||
|
void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
|
||||||
|
void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
void ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
|
||||||
|
Evas *ecore_evas_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_move(Ecore_Evas *ee, int x, int y);
|
||||||
|
void ecore_evas_resize(Ecore_Evas *ee, int w, int h);
|
||||||
|
void ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
|
||||||
|
void ecore_evas_geometry_get(Ecore_Evas *ee, int *x, int *y, int *w, int *h);
|
||||||
|
void ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
|
||||||
|
int ecore_evas_rotation_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_shaped_set(Ecore_Evas *ee, int shaped);
|
||||||
|
int ecore_evas_shaped_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_show(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_hide(Ecore_Evas *ee);
|
||||||
|
int ecore_evas_visibility_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_raise(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_lower(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_title_set(Ecore_Evas *ee, const char *t);
|
||||||
|
const char *ecore_evas_title_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
|
||||||
|
void ecore_evas_name_class_get(Ecore_Evas *ee, const char **n, const char **c);
|
||||||
|
void ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
|
||||||
|
void ecore_evas_size_min_get(Ecore_Evas *ee, int *w, int *h);
|
||||||
|
void ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
|
||||||
|
void ecore_evas_size_max_get(Ecore_Evas *ee, int *w, int *h);
|
||||||
|
void ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
|
||||||
|
void ecore_evas_size_base_get(Ecore_Evas *ee, int *w, int *h);
|
||||||
|
void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
|
||||||
|
void ecore_evas_size_step_get(Ecore_Evas *ee, int *w, int *h);
|
||||||
|
void ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
|
||||||
|
void ecore_evas_cursor_get(Ecore_Evas *ee, char **file, int *layer, int *hot_x, int *hot_y);
|
||||||
|
void ecore_evas_layer_set(Ecore_Evas *ee, int layer);
|
||||||
|
int ecore_evas_layer_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_focus_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_focus_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_iconified_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_iconified_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_borderless_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_borderless_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_override_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_override_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_maximized_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_maximized_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_fullscreen_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_fullscreen_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_avoid_damage_set(Ecore_Evas *ee, int on);
|
||||||
|
int ecore_evas_avoid_damage_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_withdrawn_set(Ecore_Evas *ee, int withdrawn);
|
||||||
|
int ecore_evas_withdrawn_get(Ecore_Evas *ee);
|
||||||
|
void ecore_evas_sticky_set(Ecore_Evas *ee, int sticky);
|
||||||
|
int ecore_evas_sticky_get(Ecore_Evas *ee);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -29,7 +29,7 @@ $(ECORE_X_INC) \
|
||||||
$(ECORE_FB_INC) \
|
$(ECORE_FB_INC) \
|
||||||
@evas_cflags@
|
@evas_cflags@
|
||||||
|
|
||||||
libecore_evas_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_evas_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
$(ECORE_X_LDF) \
|
$(ECORE_X_LDF) \
|
||||||
$(ECORE_FB_LDF) \
|
$(ECORE_FB_LDF) \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
@ -60,7 +60,6 @@ $(top_builddir)/src/lib/ecore/libecore.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
Ecore_Evas.h.in \
|
|
||||||
ecore_evas.c \
|
ecore_evas.c \
|
||||||
ecore_evas_x.c \
|
ecore_evas_x.c \
|
||||||
ecore_evas_fb.c \
|
ecore_evas_fb.c \
|
||||||
|
|
|
@ -6,6 +6,47 @@
|
||||||
|
|
||||||
static int _ecore_evas_init_count = 0;
|
static int _ecore_evas_init_count = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query if a particular renginering engine target has support
|
||||||
|
* @param engine The engine to check support for
|
||||||
|
* @return 1 if the particualr engine is supported, 0 if it is not
|
||||||
|
*
|
||||||
|
* Query if engine @param engine is supported by ecore_evas. 1 is returned if
|
||||||
|
* it is, and 0 is returned if it is not supported.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
|
||||||
|
{
|
||||||
|
switch (engine)
|
||||||
|
{
|
||||||
|
case ECORE_EVAS_ENGINE_SOFTWARE_X11:
|
||||||
|
#ifdef BUILD_ECORE_X
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case ECORE_EVAS_ENGINE_SOFTWARE_FB:
|
||||||
|
#ifdef BUILD_ECORE_EVAS_FB
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case ECORE_EVAS_ENGINE_GL_X11:
|
||||||
|
#ifdef BUILD_ECORE_EVAS_GL
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init the Evas system.
|
* Init the Evas system.
|
||||||
* @return greater than 0 on success, 0 on failure
|
* @return greater than 0 on success, 0 on failure
|
||||||
|
@ -16,8 +57,7 @@ int
|
||||||
ecore_evas_init(void)
|
ecore_evas_init(void)
|
||||||
{
|
{
|
||||||
if (_ecore_evas_init_count == 0)
|
if (_ecore_evas_init_count == 0)
|
||||||
evas_init ();
|
evas_init ();
|
||||||
|
|
||||||
return ++_ecore_evas_init_count;
|
return ++_ecore_evas_init_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,8 +79,7 @@ ecore_evas_shutdown(void)
|
||||||
#ifdef BUILD_ECORE_EVAS_FB
|
#ifdef BUILD_ECORE_EVAS_FB
|
||||||
while (_ecore_evas_fb_shutdown());
|
while (_ecore_evas_fb_shutdown());
|
||||||
#endif
|
#endif
|
||||||
|
evas_shutdown();
|
||||||
evas_shutdown();
|
|
||||||
}
|
}
|
||||||
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
|
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
|
||||||
return _ecore_evas_init_count;
|
return _ecore_evas_init_count;
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
#include "ecore_private.h"
|
#include "ecore_private.h"
|
||||||
#include "ecore_evas_private.h"
|
#include "ecore_evas_private.h"
|
||||||
#include "Ecore_Evas.h"
|
#include "Ecore_Evas.h"
|
||||||
|
#ifdef BUILD_ECORE_X
|
||||||
#include "Ecore_X.h"
|
#include "Ecore_X.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUILD_ECORE_X
|
||||||
static int _ecore_evas_init_count = 0;
|
static int _ecore_evas_init_count = 0;
|
||||||
|
|
||||||
static int _ecore_evas_fps_debug = 0;
|
static int _ecore_evas_fps_debug = 0;
|
||||||
|
@ -1114,6 +1117,7 @@ static const Ecore_Evas_Engine_Func _ecore_x_engine_func =
|
||||||
_ecore_evas_withdrawn_set,
|
_ecore_evas_withdrawn_set,
|
||||||
_ecore_evas_sticky_set
|
_ecore_evas_sticky_set
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be documented.
|
* To be documented.
|
||||||
|
@ -1124,6 +1128,7 @@ Ecore_Evas *
|
||||||
ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
|
ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
|
#ifdef BUILD_ECORE_X
|
||||||
Evas_Engine_Info_Software_X11 *einfo;
|
Evas_Engine_Info_Software_X11 *einfo;
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
int rmethod;
|
int rmethod;
|
||||||
|
@ -1187,6 +1192,9 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
|
|
||||||
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
|
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
|
||||||
return ee;
|
return ee;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1197,14 +1205,18 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
Ecore_X_Window
|
Ecore_X_Window
|
||||||
ecore_evas_software_x11_window_get(Ecore_Evas *ee)
|
ecore_evas_software_x11_window_get(Ecore_Evas *ee)
|
||||||
{
|
{
|
||||||
|
#ifdef BUILD_ECORE_X
|
||||||
return ee->engine.x.win_container;
|
return ee->engine.x.win_container;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_GL
|
|
||||||
Ecore_Evas *
|
Ecore_Evas *
|
||||||
ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent,
|
ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
|
#ifdef BUILD_ECORE_EVAS_GL
|
||||||
Evas_Engine_Info_GL_X11 *einfo;
|
Evas_Engine_Info_GL_X11 *einfo;
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
int rmethod;
|
int rmethod;
|
||||||
|
@ -1292,6 +1304,9 @@ ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
|
|
||||||
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
|
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
|
||||||
return ee;
|
return ee;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1302,6 +1317,9 @@ ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent,
|
||||||
Ecore_X_Window
|
Ecore_X_Window
|
||||||
ecore_evas_gl_x11_window_get(Ecore_Evas *ee)
|
ecore_evas_gl_x11_window_get(Ecore_Evas *ee)
|
||||||
{
|
{
|
||||||
|
#ifdef BUILD_ECORE_EVAS_GL
|
||||||
return ee->engine.x.win_container;
|
return ee->engine.x.win_container;
|
||||||
}
|
#else
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ INCLUDES = \
|
||||||
-I$(top_srcdir)/src/lib/ecore \
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
-I$(top_builddir)/src/lib/ecore
|
-I$(top_builddir)/src/lib/ecore
|
||||||
|
|
||||||
libecore_fb_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_fb_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
|
||||||
if BUILD_ECORE_FB
|
if BUILD_ECORE_FB
|
||||||
|
|
|
@ -6,12 +6,6 @@
|
||||||
* @brief Ecore inter-process communication functions.
|
* @brief Ecore inter-process communication functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HAVE_ECORE_IPC_OPENSSL @USE_OPENSSL@
|
|
||||||
|
|
||||||
#if HAVE_ECORE_IPC_OPENSSL
|
|
||||||
#include <openssl/ssl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,10 +19,8 @@ extern "C" {
|
||||||
{
|
{
|
||||||
ECORE_IPC_LOCAL_USER,
|
ECORE_IPC_LOCAL_USER,
|
||||||
ECORE_IPC_LOCAL_SYSTEM,
|
ECORE_IPC_LOCAL_SYSTEM,
|
||||||
ECORE_IPC_REMOTE_SYSTEM
|
ECORE_IPC_REMOTE_SYSTEM,
|
||||||
#if HAVE_ECORE_IPC_OPENSSL
|
ECORE_IPC_USE_SSL = 16
|
||||||
,ECORE_IPC_USE_SSL = 16
|
|
||||||
#endif
|
|
||||||
} Ecore_Ipc_Type;
|
} Ecore_Ipc_Type;
|
||||||
|
|
||||||
typedef struct _Ecore_Ipc_Event_Client_Add Ecore_Ipc_Event_Client_Add;
|
typedef struct _Ecore_Ipc_Event_Client_Add Ecore_Ipc_Event_Client_Add;
|
||||||
|
@ -111,6 +103,8 @@ extern "C" {
|
||||||
void *ecore_ipc_client_del(Ecore_Ipc_Client *cl);
|
void *ecore_ipc_client_del(Ecore_Ipc_Client *cl);
|
||||||
void ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data);
|
void ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data);
|
||||||
void *ecore_ipc_client_data_get(Ecore_Ipc_Client *cl);
|
void *ecore_ipc_client_data_get(Ecore_Ipc_Client *cl);
|
||||||
|
|
||||||
|
int ecore_ipc_ssl_available_get(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
|
@ -1,15 +1,15 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/src/lib/ecore \
|
|
||||||
-I$(top_srcdir)/src/lib/ecore_con \
|
|
||||||
-I$(top_srcdir)/src/lib/ecore_ipc \
|
|
||||||
-I$(top_builddir)/src/lib/ecore \
|
-I$(top_builddir)/src/lib/ecore \
|
||||||
-I$(top_builddir)/src/lib/ecore_con \
|
-I$(top_builddir)/src/lib/ecore_con \
|
||||||
-I$(top_builddir)/src/lib/ecore_ipc \
|
-I$(top_builddir)/src/lib/ecore_ipc \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_con \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_ipc \
|
||||||
@SSL_CFLAGS@
|
@SSL_CFLAGS@
|
||||||
|
|
||||||
libecore_ipc_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_ipc_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs \
|
-L$(top_builddir)/src/lib/ecore/.libs \
|
||||||
-L$(top_builddir)/src/lib/ecore_con/.libs
|
-L$(top_builddir)/src/lib/ecore_con/.libs
|
||||||
|
|
||||||
|
@ -35,6 +35,5 @@ $(top_builddir)/src/lib/ecore_con/libecore_con.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
Ecore_Ipc.h.in \
|
|
||||||
ecore_ipc.c \
|
ecore_ipc.c \
|
||||||
ecore_ipc_private.h
|
ecore_ipc_private.h
|
||||||
|
|
|
@ -280,10 +280,8 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, char *name, int port, const void
|
||||||
svr = calloc(1, sizeof(Ecore_Ipc_Server));
|
svr = calloc(1, sizeof(Ecore_Ipc_Server));
|
||||||
if (!svr) return NULL;
|
if (!svr) return NULL;
|
||||||
type = compl_type;
|
type = compl_type;
|
||||||
#if USE_OPENSSL
|
|
||||||
type &= ~ECORE_IPC_USE_SSL;
|
type &= ~ECORE_IPC_USE_SSL;
|
||||||
if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
|
if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
|
||||||
#endif
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ECORE_IPC_LOCAL_USER:
|
case ECORE_IPC_LOCAL_USER:
|
||||||
|
@ -337,10 +335,8 @@ ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const
|
||||||
svr = calloc(1, sizeof(Ecore_Ipc_Server));
|
svr = calloc(1, sizeof(Ecore_Ipc_Server));
|
||||||
if (!svr) return NULL;
|
if (!svr) return NULL;
|
||||||
type = compl_type;
|
type = compl_type;
|
||||||
#if USE_OPENSSL
|
|
||||||
type &= ~ECORE_IPC_USE_SSL;
|
type &= ~ECORE_IPC_USE_SSL;
|
||||||
if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
|
if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
|
||||||
#endif
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ECORE_IPC_LOCAL_USER:
|
case ECORE_IPC_LOCAL_USER:
|
||||||
|
@ -702,6 +698,16 @@ ecore_ipc_client_data_get(Ecore_Ipc_Client *cl)
|
||||||
return cl->data;
|
return cl->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * Returns if SSL support is available
|
||||||
|
* * @return 1 if SSL is available, 0 if it is not.
|
||||||
|
* * @ingroup Ecore_Con_Client_Group
|
||||||
|
* */
|
||||||
|
int
|
||||||
|
ecore_ipc_ssl_available_get(void)
|
||||||
|
{
|
||||||
|
return ecore_con_ssl_available_get();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef _ECORE_IPC_PRIVATE_H
|
#ifndef _ECORE_IPC_PRIVATE_H
|
||||||
#define _ECORE_IPC_PRIVATE_H
|
#define _ECORE_IPC_PRIVATE_H
|
||||||
|
|
||||||
|
#if USE_OPENSSL
|
||||||
|
#include <openssl/ssl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ECORE_MAGIC_IPC_SERVER 0x87786556
|
#define ECORE_MAGIC_IPC_SERVER 0x87786556
|
||||||
#define ECORE_MAGIC_IPC_CLIENT 0x78875665
|
#define ECORE_MAGIC_IPC_CLIENT 0x78875665
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ INCLUDES = \
|
||||||
-I$(top_srcdir)/src/lib/ecore \
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
-I$(top_builddir)/src/lib/ecore
|
-I$(top_builddir)/src/lib/ecore
|
||||||
|
|
||||||
libecore_job_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_job_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
|
||||||
if BUILD_ECORE_JOB
|
if BUILD_ECORE_JOB
|
||||||
|
|
|
@ -5,7 +5,7 @@ INCLUDES = \
|
||||||
-I$(top_builddir)/src/lib/ecore \
|
-I$(top_builddir)/src/lib/ecore \
|
||||||
@iconv_cflags@
|
@iconv_cflags@
|
||||||
|
|
||||||
libecore_txt_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_txt_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs
|
-L$(top_builddir)/src/lib/ecore/.libs
|
||||||
|
|
||||||
if BUILD_ECORE_TXT
|
if BUILD_ECORE_TXT
|
||||||
|
|
|
@ -867,12 +867,25 @@ void ecore_x_gc_del(Ecore_X_GC gc);
|
||||||
int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, long d0, long d1, long d2, long d3, long d4);
|
int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, long d0, long d1, long d2, long d3, long d4);
|
||||||
int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len);
|
int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len);
|
||||||
|
|
||||||
void ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win);
|
void
|
||||||
void ecore_x_icccm_window_state_set_normal(Ecore_X_Window win);
|
ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state);
|
||||||
void ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window win);
|
void
|
||||||
void ecore_x_icccm_send_delete_window(Ecore_X_Window win);
|
ecore_x_icccm_delete_window_send(Ecore_X_Window win);
|
||||||
void ecore_x_icccm_send_take_focus(Ecore_X_Window win);
|
void
|
||||||
|
ecore_x_icccm_take_focus_send(Ecore_X_Window win);
|
||||||
|
void
|
||||||
|
ecore_x_icccm_save_yourself_send(Ecore_X_Window win);
|
||||||
|
void
|
||||||
|
ecore_x_icccm_move_resize_send(Ecore_X_Window win,
|
||||||
|
int x, int y, int w, int h);
|
||||||
|
int
|
||||||
|
ecore_x_icccm_basic_hints_get(Ecore_X_Window win,
|
||||||
|
int *accepts_focus,
|
||||||
|
Ecore_X_Window_State_Hint *initial_state,
|
||||||
|
Ecore_X_Pixmap *icon_pixmap,
|
||||||
|
Ecore_X_Pixmap *icon_mask,
|
||||||
|
Ecore_X_Window *icon_window,
|
||||||
|
Ecore_X_Window *window_group);
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: these funcs need categorising */
|
/* FIXME: these funcs need categorising */
|
||||||
|
@ -922,16 +935,6 @@ void ecore_x_icccm_send_take_focus(Ecore_X_Window win);
|
||||||
ecore_x_window_save_set_del(Ecore_X_Window win);
|
ecore_x_window_save_set_del(Ecore_X_Window win);
|
||||||
Ecore_X_Window *
|
Ecore_X_Window *
|
||||||
ecore_x_window_children_get(Ecore_X_Window win, int *num);
|
ecore_x_window_children_get(Ecore_X_Window win, int *num);
|
||||||
void
|
|
||||||
ecore_x_window_synthetic_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h);
|
|
||||||
void
|
|
||||||
ecore_x_window_basic_hints_get(Ecore_X_Window win,
|
|
||||||
int *accepts_focus,
|
|
||||||
Ecore_X_Window_State_Hint *initial_state,
|
|
||||||
Ecore_X_Pixmap *icon_pixmap,
|
|
||||||
Ecore_X_Pixmap *icon_mask,
|
|
||||||
Ecore_X_Window *icon_window,
|
|
||||||
Ecore_X_Window *window_group);
|
|
||||||
|
|
||||||
Ecore_X_Cursor
|
Ecore_X_Cursor
|
||||||
ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
|
ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
|
||||||
|
|
|
@ -9,7 +9,7 @@ INCLUDES = \
|
||||||
-I$(top_builddir)/src/lib/ecore_job \
|
-I$(top_builddir)/src/lib/ecore_job \
|
||||||
@x_cflags@
|
@x_cflags@
|
||||||
|
|
||||||
libecore_x_la_LDFLAGS = -version-info 1:0:0 \
|
libecore_x_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
|
||||||
-L$(top_builddir)/src/lib/ecore/.libs \
|
-L$(top_builddir)/src/lib/ecore/.libs \
|
||||||
-L$(top_builddir)/src/lib/ecore_txt/.libs \
|
-L$(top_builddir)/src/lib/ecore_txt/.libs \
|
||||||
-L$(top_builddir)/src/lib/ecore_job/.libs
|
-L$(top_builddir)/src/lib/ecore_job/.libs
|
||||||
|
|
|
@ -1060,75 +1060,6 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
|
||||||
return windows;
|
return windows;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ecore_x_window_synthetic_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
|
|
||||||
ev.type = ConfigureNotify;
|
|
||||||
ev.xconfigure.display = _ecore_x_disp;
|
|
||||||
ev.xconfigure.event = win;
|
|
||||||
ev.xconfigure.window = win;
|
|
||||||
ev.xconfigure.x = x;
|
|
||||||
ev.xconfigure.y = y;
|
|
||||||
ev.xconfigure.width = w;
|
|
||||||
ev.xconfigure.height = h;
|
|
||||||
ev.xconfigure.border_width = 0;
|
|
||||||
ev.xconfigure.above = win;
|
|
||||||
ev.xconfigure.override_redirect = False;
|
|
||||||
XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ecore_x_window_basic_hints_get(Ecore_X_Window win,
|
|
||||||
int *accepts_focus,
|
|
||||||
Ecore_X_Window_State_Hint *initial_state,
|
|
||||||
Ecore_X_Pixmap *icon_pixmap,
|
|
||||||
Ecore_X_Pixmap *icon_mask,
|
|
||||||
Ecore_X_Window *icon_window,
|
|
||||||
Ecore_X_Window *window_group)
|
|
||||||
{
|
|
||||||
XWMHints *hints;
|
|
||||||
|
|
||||||
hints = XGetWMHints(_ecore_x_disp, win);
|
|
||||||
if (hints)
|
|
||||||
{
|
|
||||||
if ((hints->flags & InputHint) && (accepts_focus))
|
|
||||||
{
|
|
||||||
if (hints->input)
|
|
||||||
*accepts_focus = 1;
|
|
||||||
else
|
|
||||||
*accepts_focus = 0;
|
|
||||||
}
|
|
||||||
if ((hints->flags & StateHint) && (initial_state))
|
|
||||||
{
|
|
||||||
if (hints->initial_state == WithdrawnState)
|
|
||||||
*initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
|
|
||||||
else if (hints->initial_state == NormalState)
|
|
||||||
*initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
|
|
||||||
else if (hints->initial_state == IconicState)
|
|
||||||
*initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
|
|
||||||
}
|
|
||||||
if ((hints->flags & IconPixmapHint) && (icon_pixmap))
|
|
||||||
{
|
|
||||||
*icon_pixmap = hints->icon_pixmap;
|
|
||||||
}
|
|
||||||
if ((hints->flags & IconMaskHint) && (icon_mask))
|
|
||||||
{
|
|
||||||
*icon_mask = hints->icon_pixmap;
|
|
||||||
}
|
|
||||||
if ((hints->flags & IconWindowHint) && (icon_window))
|
|
||||||
{
|
|
||||||
*icon_window = hints->icon_window;
|
|
||||||
}
|
|
||||||
if ((hints->flags & WindowGroupHint) && (window_group))
|
|
||||||
{
|
|
||||||
*window_group = hints->window_group;
|
|
||||||
}
|
|
||||||
XFree(hints);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,17 @@
|
||||||
#include "ecore_x_private.h"
|
#include "ecore_x_private.h"
|
||||||
#include "Ecore_X.h"
|
#include "Ecore_X.h"
|
||||||
|
|
||||||
static void
|
void
|
||||||
_ecore_x_icccm_window_state_set(Ecore_X_Window win, unsigned int state)
|
ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
|
||||||
{
|
{
|
||||||
unsigned long c[2];
|
unsigned long c[2];
|
||||||
|
|
||||||
c[0] = state;
|
if (state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
|
||||||
|
c[0] = WithdrawnState;
|
||||||
|
else if (state == ECORE_X_WINDOW_STATE_HINT_NORMAL)
|
||||||
|
c[0] = NormalState;
|
||||||
|
else if (state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
|
||||||
|
c[0] = IconicState;
|
||||||
c[1] = 0;
|
c[1] = 0;
|
||||||
XChangeProperty(_ecore_x_disp, win, _ecore_x_atom_wm_state,
|
XChangeProperty(_ecore_x_disp, win, _ecore_x_atom_wm_state,
|
||||||
_ecore_x_atom_wm_state, 32, PropModeReplace,
|
_ecore_x_atom_wm_state, 32, PropModeReplace,
|
||||||
|
@ -19,50 +24,187 @@ _ecore_x_icccm_window_state_set(Ecore_X_Window win, unsigned int state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win)
|
ecore_x_icccm_delete_window_send(Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
_ecore_x_icccm_window_state_set(win, IconicState);
|
ecore_x_client_message32_send(win, _ecore_x_atom_wm_protocols,
|
||||||
|
_ecore_x_atom_wm_delete_window,
|
||||||
|
CurrentTime, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ecore_x_icccm_window_state_set_normal(Ecore_X_Window win)
|
ecore_x_icccm_take_focus_send(Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
_ecore_x_icccm_window_state_set(win, NormalState);
|
ecore_x_client_message32_send(win, _ecore_x_atom_wm_protocols,
|
||||||
}
|
_ecore_x_atom_wm_take_focus,
|
||||||
|
CurrentTime, 0, 0, 0);
|
||||||
void
|
|
||||||
ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window win)
|
|
||||||
{
|
|
||||||
_ecore_x_icccm_window_state_set(win, WithdrawnState);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_x_icccm_client_message_send(Ecore_X_Window win,
|
|
||||||
Ecore_X_Atom atom, Ecore_X_Time ts)
|
|
||||||
{
|
|
||||||
ecore_x_client_message32_send(win, _ecore_x_atom_wm_protocols, atom, ts,
|
|
||||||
0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ecore_x_icccm_send_delete_window(Ecore_X_Window win)
|
|
||||||
{
|
|
||||||
_ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_delete_window,
|
|
||||||
CurrentTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ecore_x_icccm_send_take_focus(Ecore_X_Window win)
|
|
||||||
{
|
|
||||||
_ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_take_focus,
|
|
||||||
CurrentTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
void
|
void
|
||||||
ecore_x_icccm_send_save_yourself(Ecore_X_Window win)
|
ecore_x_icccm_save_yourself_send(Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
_ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_save_yourself,
|
ecore_x_client_message32_send(win, _ecore_x_atom_wm_protocols,
|
||||||
CurrentTime);
|
_ecore_x_atom_wm_save_yourself,
|
||||||
|
CurrentTime, 0, 0, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
ecore_x_icccm_move_resize_send(Ecore_X_Window win,
|
||||||
|
int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
XEvent ev;
|
||||||
|
|
||||||
|
ev.type = ConfigureNotify;
|
||||||
|
ev.xconfigure.display = _ecore_x_disp;
|
||||||
|
ev.xconfigure.event = win;
|
||||||
|
ev.xconfigure.window = win;
|
||||||
|
ev.xconfigure.x = x;
|
||||||
|
ev.xconfigure.y = y;
|
||||||
|
ev.xconfigure.width = w;
|
||||||
|
ev.xconfigure.height = h;
|
||||||
|
ev.xconfigure.border_width = 0;
|
||||||
|
ev.xconfigure.above = win;
|
||||||
|
ev.xconfigure.override_redirect = False;
|
||||||
|
XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ecore_x_icccm_basic_hints_get(Ecore_X_Window win,
|
||||||
|
int *accepts_focus,
|
||||||
|
Ecore_X_Window_State_Hint *initial_state,
|
||||||
|
Ecore_X_Pixmap *icon_pixmap,
|
||||||
|
Ecore_X_Pixmap *icon_mask,
|
||||||
|
Ecore_X_Window *icon_window,
|
||||||
|
Ecore_X_Window *window_group)
|
||||||
|
{
|
||||||
|
XWMHints *hints;
|
||||||
|
|
||||||
|
hints = XGetWMHints(_ecore_x_disp, win);
|
||||||
|
if (hints)
|
||||||
|
{
|
||||||
|
if ((hints->flags & InputHint) && (accepts_focus))
|
||||||
|
{
|
||||||
|
if (hints->input)
|
||||||
|
*accepts_focus = 1;
|
||||||
|
else
|
||||||
|
*accepts_focus = 0;
|
||||||
|
}
|
||||||
|
if ((hints->flags & StateHint) && (initial_state))
|
||||||
|
{
|
||||||
|
if (hints->initial_state == WithdrawnState)
|
||||||
|
*initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
|
||||||
|
else if (hints->initial_state == NormalState)
|
||||||
|
*initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
|
||||||
|
else if (hints->initial_state == IconicState)
|
||||||
|
*initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
|
||||||
|
}
|
||||||
|
if ((hints->flags & IconPixmapHint) && (icon_pixmap))
|
||||||
|
{
|
||||||
|
*icon_pixmap = hints->icon_pixmap;
|
||||||
|
}
|
||||||
|
if ((hints->flags & IconMaskHint) && (icon_mask))
|
||||||
|
{
|
||||||
|
*icon_mask = hints->icon_pixmap;
|
||||||
|
}
|
||||||
|
if ((hints->flags & IconWindowHint) && (icon_window))
|
||||||
|
{
|
||||||
|
*icon_window = hints->icon_window;
|
||||||
|
}
|
||||||
|
if ((hints->flags & WindowGroupHint) && (window_group))
|
||||||
|
{
|
||||||
|
*window_group = hints->window_group;
|
||||||
|
}
|
||||||
|
XFree(hints);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: working here */
|
||||||
|
int
|
||||||
|
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
XSizeHints hint;
|
||||||
|
long mask;
|
||||||
|
|
||||||
|
if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask)) return 0;
|
||||||
|
if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
|
||||||
|
{
|
||||||
|
int x, y, w, h;
|
||||||
|
|
||||||
|
// D("%li %li\n", hint.flags & USPosition, hint.flags & PPosition);
|
||||||
|
// b->client.pos.requested = 1;
|
||||||
|
// b->client.pos.gravity = NorthWestGravity;
|
||||||
|
// if (hint.flags & PWinGravity)
|
||||||
|
// b->client.pos.gravity = hint.win_gravity;
|
||||||
|
// x = y = w = h = 0;
|
||||||
|
// ecore_window_get_geometry(win, &x, &y, &w, &h);
|
||||||
|
// b->client.pos.x = x;
|
||||||
|
// b->client.pos.y = y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// b->client.pos.requested = 0;
|
||||||
|
}
|
||||||
|
if (hint.flags & PMinSize)
|
||||||
|
{
|
||||||
|
// min_w = hint.min_width;
|
||||||
|
// min_h = hint.min_height;
|
||||||
|
}
|
||||||
|
if (hint.flags & PMaxSize)
|
||||||
|
{
|
||||||
|
// max_w = hint.max_width;
|
||||||
|
// max_h = hint.max_height;
|
||||||
|
// if (max_w < min_w)
|
||||||
|
// max_w = min_w;
|
||||||
|
// if (max_h < min_h)
|
||||||
|
// max_h = min_h;
|
||||||
|
}
|
||||||
|
if (hint.flags & PResizeInc)
|
||||||
|
{
|
||||||
|
// step_w = hint.width_inc;
|
||||||
|
// step_h = hint.height_inc;
|
||||||
|
// if (step_w < 1)
|
||||||
|
// step_w = 1;
|
||||||
|
// if (step_h < 1)
|
||||||
|
// step_h = 1;
|
||||||
|
}
|
||||||
|
if (hint.flags & PBaseSize)
|
||||||
|
{
|
||||||
|
// base_w = hint.base_width;
|
||||||
|
// base_h = hint.base_height;
|
||||||
|
// if (base_w > max_w)
|
||||||
|
// max_w = base_w;
|
||||||
|
// if (base_h > max_h)
|
||||||
|
// max_h = base_h;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// base_w = min_w;
|
||||||
|
// base_h = min_h;
|
||||||
|
}
|
||||||
|
if (hint.flags & PAspect)
|
||||||
|
{
|
||||||
|
// if (hint.min_aspect.y > 0)
|
||||||
|
// aspect_min =
|
||||||
|
// ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
|
||||||
|
// if (hint.max_aspect.y > 0)
|
||||||
|
// aspect_max =
|
||||||
|
// ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: move these things in here as they are icccm related */
|
||||||
|
/* get/set title */
|
||||||
|
/* get/set name/class */
|
||||||
|
/* get/set machine */
|
||||||
|
/* get/set command */
|
||||||
|
/* get/set icon name */
|
||||||
|
|
||||||
|
/* FIXME: there are older E hints, gnome hitns and mwm hints and new netwm */
|
||||||
|
/* hints. each should go in their own file/section so we know which */
|
||||||
|
/* is which. also older kde hints too. we shoudl try support as much */
|
||||||
|
/* as makese sense to support */
|
||||||
|
|
Loading…
Reference in New Issue