Ecore_Win32 library
Ecore_Win32 is a library that wraps Windows graphic functions and integrate them nicely into the Ecore main loop. More...
Data Structures | |
struct | _Ecore_Win32_Event_Mouse_In |
Event sent when the mouse enters the window. More... | |
struct | _Ecore_Win32_Event_Mouse_Out |
Event sent when the mouse leaves the window. More... | |
struct | _Ecore_Win32_Event_Window_Focus_In |
Event sent when the window gets the focus. More... | |
struct | _Ecore_Win32_Event_Window_Focus_Out |
Event sent when the window looses the focus. More... | |
struct | _Ecore_Win32_Event_Window_Damage |
Event sent when the window is damaged. More... | |
struct | _Ecore_Win32_Event_Window_Create |
Event sent when the window is created. More... | |
struct | _Ecore_Win32_Event_Window_Destroy |
Event sent when the window is destroyed. More... | |
struct | _Ecore_Win32_Event_Window_Hide |
Event sent when the window is hidden. More... | |
struct | _Ecore_Win32_Event_Window_Show |
Event sent when the window is shown. More... | |
struct | _Ecore_Win32_Event_Window_Configure |
Event sent when the window is configured. More... | |
struct | _Ecore_Win32_Event_Window_Resize |
Event sent when the window is resized. More... | |
struct | _Ecore_Win32_Event_Window_Delete_Request |
Event sent when the window is deleted. More... | |
Typedefs | |
typedef void | Ecore_Win32_Cursor |
Abstract type for a cursor. | |
typedef struct _Ecore_Win32_Event_Mouse_In | Ecore_Win32_Event_Mouse_In |
Event sent when the mouse enters the window. | |
typedef struct _Ecore_Win32_Event_Mouse_Out | Ecore_Win32_Event_Mouse_Out |
Event sent when the mouse leaves the window. | |
typedef struct _Ecore_Win32_Event_Window_Focus_In | Ecore_Win32_Event_Window_Focus_In |
Event sent when the window gets the focus. | |
typedef struct _Ecore_Win32_Event_Window_Focus_Out | Ecore_Win32_Event_Window_Focus_Out |
Event sent when the window looses the focus. | |
typedef struct _Ecore_Win32_Event_Window_Damage | Ecore_Win32_Event_Window_Damage |
Event sent when the window is damaged. | |
typedef struct _Ecore_Win32_Event_Window_Create | Ecore_Win32_Event_Window_Create |
Event sent when the window is created. | |
typedef struct _Ecore_Win32_Event_Window_Destroy | Ecore_Win32_Event_Window_Destroy |
Event sent when the window is destroyed. | |
typedef struct _Ecore_Win32_Event_Window_Hide | Ecore_Win32_Event_Window_Hide |
Event sent when the window is hidden. | |
typedef struct _Ecore_Win32_Event_Window_Show | Ecore_Win32_Event_Window_Show |
Event sent when the window is shown. | |
typedef struct _Ecore_Win32_Event_Window_Configure | Ecore_Win32_Event_Window_Configure |
Event sent when the window is configured. | |
typedef struct _Ecore_Win32_Event_Window_Resize | Ecore_Win32_Event_Window_Resize |
Event sent when the window is resized. | |
typedef struct _Ecore_Win32_Event_Window_Delete_Request | Ecore_Win32_Event_Window_Delete_Request |
Event sent when the window is deleted. | |
typedef int(* | Ecore_Win32_Dnd_DropTarget_Callback )(void *window, int event, int pt_x, int pt_y, void *data, int size) |
Callback type for Drop operations. | |
typedef struct _Ecore_Win32_Window | Ecore_Win32_Window |
Abstract type for a window. | |
Enumerations | |
enum | Ecore_Win32_Window_State { ECORE_WIN32_WINDOW_STATE_ICONIFIED, ECORE_WIN32_WINDOW_STATE_MODAL, ECORE_WIN32_WINDOW_STATE_STICKY, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ, ECORE_WIN32_WINDOW_STATE_MAXIMIZED, ECORE_WIN32_WINDOW_STATE_SHADED, ECORE_WIN32_WINDOW_STATE_HIDDEN, ECORE_WIN32_WINDOW_STATE_FULLSCREEN, ECORE_WIN32_WINDOW_STATE_ABOVE, ECORE_WIN32_WINDOW_STATE_BELOW, ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION, ECORE_WIN32_WINDOW_STATE_UNKNOWN } |
State of a window. More... | |
enum | Ecore_Win32_Window_Type { ECORE_WIN32_WINDOW_TYPE_DESKTOP, ECORE_WIN32_WINDOW_TYPE_DOCK, ECORE_WIN32_WINDOW_TYPE_TOOLBAR, ECORE_WIN32_WINDOW_TYPE_MENU, ECORE_WIN32_WINDOW_TYPE_UTILITY, ECORE_WIN32_WINDOW_TYPE_SPLASH, ECORE_WIN32_WINDOW_TYPE_DIALOG, ECORE_WIN32_WINDOW_TYPE_NORMAL, ECORE_WIN32_WINDOW_TYPE_UNKNOWN } |
Type of a window. More... | |
enum | Ecore_Win32_Cursor_Shape { ECORE_WIN32_CURSOR_SHAPE_APP_STARTING, ECORE_WIN32_CURSOR_SHAPE_ARROW, ECORE_WIN32_CURSOR_SHAPE_CROSS, ECORE_WIN32_CURSOR_SHAPE_HAND, ECORE_WIN32_CURSOR_SHAPE_HELP, ECORE_WIN32_CURSOR_SHAPE_I_BEAM, ECORE_WIN32_CURSOR_SHAPE_NO, ECORE_WIN32_CURSOR_SHAPE_SIZE_ALL, ECORE_WIN32_CURSOR_SHAPE_SIZE_NESW, ECORE_WIN32_CURSOR_SHAPE_SIZE_NS, ECORE_WIN32_CURSOR_SHAPE_SIZE_NWSE, ECORE_WIN32_CURSOR_SHAPE_SIZE_WE, ECORE_WIN32_CURSOR_SHAPE_UP_ARROW, ECORE_WIN32_CURSOR_SHAPE_WAIT } |
Shape of a cursor. More... | |
enum | Ecore_Win32_DnD_State { ECORE_WIN32_DND_EVENT_DRAG_ENTER = 1, ECORE_WIN32_DND_EVENT_DRAG_OVER = 2, ECORE_WIN32_DND_EVENT_DRAG_LEAVE = 3, ECORE_WIN32_DND_EVENT_DROP = 4 } |
State of a DnD operation. More... | |
Functions | |
EAPI int | ecore_win32_init () |
Initialize the Ecore_Win32 library. | |
EAPI int | ecore_win32_shutdown () |
Shut down the Ecore_Win32 library. | |
EAPI int | ecore_win32_screen_depth_get () |
Retrieve the depth of the screen. | |
EAPI void | ecore_win32_double_click_time_set (double t) |
Sets the timeout for a double and triple clicks to be flagged. | |
EAPI double | ecore_win32_double_click_time_get (void) |
Retrieve the double and triple click flag timeout. | |
EAPI long | ecore_win32_current_time_get (void) |
Return the last event time. | |
EAPI Ecore_Win32_Window * | ecore_win32_window_new (Ecore_Win32_Window *parent, int x, int y, int width, int height) |
Creates a new window. | |
EAPI Ecore_Win32_Window * | ecore_win32_window_override_new (Ecore_Win32_Window *parent, int x, int y, int width, int height) |
Creates a new borderless window. | |
EAPI void | ecore_win32_window_free (Ecore_Win32_Window *window) |
Free the given window. | |
EAPI void * | ecore_win32_window_hwnd_get (Ecore_Win32_Window *window) |
Return the window HANDLE associated to the given window. | |
EAPI void | ecore_win32_window_move (Ecore_Win32_Window *window, int x, int y) |
Move the given window to a given position. | |
EAPI void | ecore_win32_window_resize (Ecore_Win32_Window *window, int width, int height) |
Resize the given window to a given size. | |
EAPI void | ecore_win32_window_move_resize (Ecore_Win32_Window *window, int x, int y, int width, int height) |
Move and resize the given window to a given position and size. | |
EAPI void | ecore_win32_window_geometry_get (Ecore_Win32_Window *window, int *x, int *y, int *width, int *height) |
Get the geometry of the given window. | |
EAPI void | ecore_win32_window_size_get (Ecore_Win32_Window *window, int *width, int *height) |
Get the size of the given window. | |
EAPI void | ecore_win32_window_size_min_set (Ecore_Win32_Window *window, unsigned int min_width, unsigned int min_height) |
Set the minimum size of the given window. | |
EAPI void | ecore_win32_window_size_min_get (Ecore_Win32_Window *window, unsigned int *min_width, unsigned int *min_height) |
Get the minimum size of the given window. | |
EAPI void | ecore_win32_window_size_max_set (Ecore_Win32_Window *window, unsigned int max_width, unsigned int max_height) |
Set the maximum size of the given window. | |
EAPI void | ecore_win32_window_size_max_get (Ecore_Win32_Window *window, unsigned int *max_width, unsigned int *max_height) |
Get the maximum size of the given window. | |
EAPI void | ecore_win32_window_size_base_set (Ecore_Win32_Window *window, unsigned int base_width, unsigned int base_height) |
Set the base size of the given window. | |
EAPI void | ecore_win32_window_size_base_get (Ecore_Win32_Window *window, unsigned int *base_width, unsigned int *base_height) |
Get the base size of the given window. | |
EAPI void | ecore_win32_window_size_step_set (Ecore_Win32_Window *window, unsigned int step_width, unsigned int step_height) |
Set the step size of the given window. | |
EAPI void | ecore_win32_window_size_step_get (Ecore_Win32_Window *window, unsigned int *step_width, unsigned int *step_height) |
Get the step size of the given window. | |
EAPI void | ecore_win32_window_show (Ecore_Win32_Window *window) |
Show the given window. | |
EAPI void | ecore_win32_window_hide (Ecore_Win32_Window *window) |
Hide the given window. | |
EAPI void | ecore_win32_window_raise (Ecore_Win32_Window *window) |
Place the given window at the top of the Z order. | |
EAPI void | ecore_win32_window_lower (Ecore_Win32_Window *window) |
Place the given window at the bottom of the Z order. | |
EAPI void | ecore_win32_window_title_set (Ecore_Win32_Window *window, const char *title) |
Set the title of the given window. | |
EAPI void | ecore_win32_window_focus_set (Ecore_Win32_Window *window) |
Set the focus to the given window. | |
EAPI void | ecore_win32_window_iconified_set (Ecore_Win32_Window *window, Eina_Bool on) |
Iconify or restore the given window. | |
EAPI void | ecore_win32_window_borderless_set (Ecore_Win32_Window *window, Eina_Bool on) |
Remove or restore the border of the given window. | |
EAPI void | ecore_win32_window_fullscreen_set (Ecore_Win32_Window *window, Eina_Bool on) |
Set the given window to fullscreen. | |
EAPI void | ecore_win32_window_cursor_set (Ecore_Win32_Window *window, Ecore_Win32_Cursor *cursor) |
Set the given cursor to the given window. | |
EAPI void | ecore_win32_window_state_set (Ecore_Win32_Window *window, Ecore_Win32_Window_State *state, unsigned int num) |
Set the state of the given window. | |
EAPI void | ecore_win32_window_state_request_send (Ecore_Win32_Window *window, Ecore_Win32_Window_State state, unsigned int set) |
Apply the modification of the state to the given window. | |
EAPI void | ecore_win32_window_type_set (Ecore_Win32_Window *window, Ecore_Win32_Window_Type type) |
Set the type of the given window. | |
EAPI Ecore_Win32_Cursor * | ecore_win32_cursor_new (const void *pixels_and, const void *pixels_xor, int width, int height, int hot_x, int hot_y) |
Create a new cursor. | |
EAPI void | ecore_win32_cursor_free (Ecore_Win32_Cursor *cursor) |
Free the given cursor. | |
EAPI Ecore_Win32_Cursor * | ecore_win32_cursor_shaped_new (Ecore_Win32_Cursor_Shape shape) |
Create a cursor from a Windows ressource. | |
EAPI void | ecore_win32_cursor_size_get (int *width, int *height) |
Retrieve the size of a valid cursor. | |
EAPI int | ecore_win32_dnd_init () |
Initialize the Ecore_Win32 Drag and Drop module. | |
EAPI int | ecore_win32_dnd_shutdown () |
Shut down the Ecore_Win32 Drag and Drop module. | |
EAPI Eina_Bool | ecore_win32_dnd_begin (const char *data, int size) |
Begin a DnD operation. | |
EAPI Eina_Bool | ecore_win32_dnd_register_drop_target (Ecore_Win32_Window *window, Ecore_Win32_Dnd_DropTarget_Callback callback) |
Register a Drop operation. | |
EAPI void | ecore_win32_dnd_unregister_drop_target (Ecore_Win32_Window *window) |
Unregister a Drop operation. | |
Variables | |
EAPI int | ECORE_WIN32_EVENT_MOUSE_IN |
Ecore_Event for the Ecore_Win32_Event_Mouse_In event. | |
EAPI int | ECORE_WIN32_EVENT_MOUSE_OUT |
Ecore_Event for the Ecore_Win32_Event_Mouse_Out event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_FOCUS_IN |
Ecore_Event for the Ecore_Win32_Event_Window_Focus_In event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT |
Ecore_Event for the Ecore_Win32_Event_Window_Focus_Out event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_DAMAGE |
Ecore_Event for the Ecore_Win32_Event_Damage event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_CREATE |
Ecore_Event for the Ecore_Win32_Event_Create event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_DESTROY |
Ecore_Event for the Ecore_Win32_Event_Destroy event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_HIDE |
Ecore_Event for the Ecore_Win32_Event_Hide event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_SHOW |
Ecore_Event for the Ecore_Win32_Event_Show event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_CONFIGURE |
Ecore_Event for the Ecore_Win32_Event_Configure event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_RESIZE |
Ecore_Event for the Ecore_Win32_Event_Resize event. | |
EAPI int | ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST |
Ecore_Event for the Ecore_Win32_Event_Window_Delete_Request event. |
Detailed Description
Ecore_Win32 is a library that wraps Windows graphic functions and integrate them nicely into the Ecore main loop.
Initialisation / Shutdown
To fill...
How to set icons to an application
It is possible to also sets the icon of the application easily:
- Create an icon with your favorite image creator. The Gimp is a good choice. Create several images of size 16, 32 and 48. You can also create images of size 24, 64, 128 and 256. Paste all of them in the image of size 16 as a layer. Save the image of size 16 with the name my_icon.ico. Put it where the source code of the application is located.
- Create my_icon_rc.rc file with your code editor and add in it:
101 ICON DISCARDABLE "my_icon.ico"
- With Visual Studio, put that file in the 'Resource file' part of the project.
- With MinGW, you have to compile it with windres: and add my_icon_rc.o to the object files of the application.
windres my_icon_rc.rc my_icon_rc.o
- Note:
- The value 101 must not be changed, it's the ID used internally by Ecore_Win32 to get the icons.
Typedef Documentation
Callback type for Drop operations.
Enumeration Type Documentation
Shape of a cursor.
- Enumerator:
State of a window.
- Enumerator:
Type of a window.
- Enumerator:
Function Documentation
EAPI long ecore_win32_current_time_get | ( | void | ) |
Return the last event time.
- Returns:
- The last envent time.
This function returns the last event time.
EAPI void ecore_win32_cursor_free | ( | Ecore_Win32_Cursor * | cursor | ) |
Free the given cursor.
- Parameters:
-
cursor The cursor to free.
This function free cursor
. cursor
must have been obtained with ecore_win32_cursor_new().
EAPI Ecore_Win32_Cursor * ecore_win32_cursor_new | ( | const void * | pixels_and, | |
const void * | pixels_xor, | |||
int | width, | |||
int | height, | |||
int | hot_x, | |||
int | hot_y | |||
) |
Create a new cursor.
- Parameters:
-
pixels_and The array of bytes containing the bit values for the AND mask of the cursor. pixels_xor The array of bytes containing the bit values for the XOR mask of the cursor. width The width of the cursor. height The height of the cursor. hot_x The horizontal position of the cursor's hot spot. hot_y The vertical position of the cursor's hot spot.
- Returns:
- A newly user-defined cursor.
This function creates a new cursor of size width
and height
. They must be valid size. To determine the valid size of a cursor, useecore_win32_cursor_size_get(). pixels_and
is an array of bytes (unsigned char) containing the bits of the cursor that will be visible. pixels_xor
is similar but will allow the cursor to have a shape. Here is the truth table for the masks:
AND mask | XOR mask | Display |
0 | 0 | Black |
0 | 1 | White |
1 | 0 | Screen |
1 | 1 | Reverse screen |
hot_x
and hot_y
are the position of the hot spot of the cursor. If pixels_and
or pixels_xor
are NULL
, the function returns NULL. If width
or height
does not match the valid size of a cursor, the function returns NULL
. On success, the function creates a user-defined cursor, otherwise it returns NULL
.
Once the cursor is not used anymore, use ecore_win32_cursor_free() to free the ressources.
Example of use:
unsigned char pixels_and[] ={ 0xFF, 0xFC, 0x3F, 0xFF, // line 1 0xFF, 0xC0, 0x1F, 0xFF, // line 2 0xFF, 0x00, 0x3F, 0xFF, // line 3 0xFE, 0x00, 0xFF, 0xFF, // line 4 0xF7, 0x01, 0xFF, 0xFF, // line 5 0xF0, 0x03, 0xFF, 0xFF, // line 6 0xF0, 0x03, 0xFF, 0xFF, // line 7 0xE0, 0x07, 0xFF, 0xFF, // line 8 0xC0, 0x07, 0xFF, 0xFF, // line 9 0xC0, 0x0F, 0xFF, 0xFF, // line 10 0x80, 0x0F, 0xFF, 0xFF, // line 11 0x80, 0x0F, 0xFF, 0xFF, // line 12 0x80, 0x07, 0xFF, 0xFF, // line 13 0x00, 0x07, 0xFF, 0xFF, // line 14 0x00, 0x03, 0xFF, 0xFF, // line 15 0x00, 0x00, 0xFF, 0xFF, // line 16 0x00, 0x00, 0x7F, 0xFF, // line 17 0x00, 0x00, 0x1F, 0xFF, // line 18 0x00, 0x00, 0x0F, 0xFF, // line 19 0x80, 0x00, 0x0F, 0xFF, // line 20 0x80, 0x00, 0x07, 0xFF, // line 21 0x80, 0x00, 0x07, 0xFF, // line 22 0xC0, 0x00, 0x07, 0xFF, // line 23 0xC0, 0x00, 0x0F, 0xFF, // line 24 0xE0, 0x00, 0x0F, 0xFF, // line 25 0xF0, 0x00, 0x1F, 0xFF, // line 26 0xF0, 0x00, 0x1F, 0xFF, // line 27 0xF8, 0x00, 0x3F, 0xFF, // line 28 0xFE, 0x00, 0x7F, 0xFF, // line 29 0xFF, 0x00, 0xFF, 0xFF, // line 30 0xFF, 0xC3, 0xFF, 0xFF, // line 31 0xFF, 0xFF, 0xFF, 0xFF // line 32 }; unsigned char pixels_xor[] = { 0x00, 0x00, 0x00, 0x00, // line 1 0x00, 0x03, 0xC0, 0x00, // line 2 0x00, 0x3F, 0x00, 0x00, // line 3 0x00, 0xFE, 0x00, 0x00, // line 4 0x0E, 0xFC, 0x00, 0x00, // line 5 0x07, 0xF8, 0x00, 0x00, // line 6 0x07, 0xF8, 0x00, 0x00, // line 7 0x0F, 0xF0, 0x00, 0x00, // line 8 0x1F, 0xF0, 0x00, 0x00, // line 9 0x1F, 0xE0, 0x00, 0x00, // line 10 0x3F, 0xE0, 0x00, 0x00, // line 11 0x3F, 0xE0, 0x00, 0x00, // line 12 0x3F, 0xF0, 0x00, 0x00, // line 13 0x7F, 0xF0, 0x00, 0x00, // line 14 0x7F, 0xF8, 0x00, 0x00, // line 15 0x7F, 0xFC, 0x00, 0x00, // line 16 0x7F, 0xFF, 0x00, 0x00, // line 17 0x7F, 0xFF, 0x80, 0x00, // line 18 0x7F, 0xFF, 0xE0, 0x00, // line 19 0x3F, 0xFF, 0xE0, 0x00, // line 20 0x3F, 0xC7, 0xF0, 0x00, // line 21 0x3F, 0x83, 0xF0, 0x00, // line 22 0x1F, 0x83, 0xF0, 0x00, // line 23 0x1F, 0x83, 0xE0, 0x00, // line 24 0x0F, 0xC7, 0xE0, 0x00, // line 25 0x07, 0xFF, 0xC0, 0x00, // line 26 0x07, 0xFF, 0xC0, 0x00, // line 27 0x01, 0xFF, 0x80, 0x00, // line 28 0x00, 0xFF, 0x00, 0x00, // line 29 0x00, 0x3C, 0x00, 0x00, // line 30 0x00, 0x00, 0x00, 0x00, // line 31 0x00, 0x00, 0x00, 0x00 // line 32 }; Ecore_Win32_Cursor cursor = ecore_win32_cursor_new(pixels_and, pixels_xor, 32, 32, 19, 2);
EAPI Ecore_Win32_Cursor * ecore_win32_cursor_shaped_new | ( | Ecore_Win32_Cursor_Shape | shape | ) |
Create a cursor from a Windows ressource.
- Parameters:
-
shape The pre-defined shape of the cursor.
- Returns:
- The new cursor.
This funtion returns a pre-defined cursor with a specified shape
. This cursor does not need to be freed, as it is loaded from an existing resource.
References ECORE_WIN32_CURSOR_SHAPE_APP_STARTING, ECORE_WIN32_CURSOR_SHAPE_ARROW, ECORE_WIN32_CURSOR_SHAPE_CROSS, ECORE_WIN32_CURSOR_SHAPE_HAND, ECORE_WIN32_CURSOR_SHAPE_HELP, ECORE_WIN32_CURSOR_SHAPE_I_BEAM, ECORE_WIN32_CURSOR_SHAPE_NO, ECORE_WIN32_CURSOR_SHAPE_SIZE_ALL, ECORE_WIN32_CURSOR_SHAPE_SIZE_NESW, ECORE_WIN32_CURSOR_SHAPE_SIZE_NS, ECORE_WIN32_CURSOR_SHAPE_SIZE_NWSE, ECORE_WIN32_CURSOR_SHAPE_SIZE_WE, ECORE_WIN32_CURSOR_SHAPE_UP_ARROW, and ECORE_WIN32_CURSOR_SHAPE_WAIT.
EAPI void ecore_win32_cursor_size_get | ( | int * | width, | |
int * | height | |||
) |
Retrieve the size of a valid cursor.
- Parameters:
-
width The width of a valid cursor. height The height of a valid cursor.
This function returns the size of a cursor that must be passed to ecore_win32_cursor_new(). width
and height
are buffers that will be filled with the correct size. They can be NULL
.
EAPI Eina_Bool ecore_win32_dnd_begin | ( | const char * | data, | |
int | size | |||
) |
Begin a DnD operation.
- Parameters:
-
data The name pf the Drag operation. size The size of the name.
- Returns:
- EINA_TRUE on success, EINA_FALSE otherwise.
This function start a Drag operation with the name data
. If data
is NULL
, EINA_FALSE is returned. if size
is less than 0, it is set to the length (as strlen()) of data
. On success the function returns EINA_TRUE, otherwise it returns EINA_FALSE.
EAPI int ecore_win32_dnd_init | ( | ) |
Initialize the Ecore_Win32 Drag and Drop module.
- Returns:
- 1 or greater on success, 0 on error.
This function initialize the Drag and Drop module. It returns 0 on failure, otherwise it returns the number of times it has already been called.
When the Drag and Drop module is not used anymore, call ecore_win32_dnd_shutdown() to shut down the module.
EAPI Eina_Bool ecore_win32_dnd_register_drop_target | ( | Ecore_Win32_Window * | window, | |
Ecore_Win32_Dnd_DropTarget_Callback | callback | |||
) |
Register a Drop operation.
- Parameters:
-
window The destination of the Drop operation. callback The callback called when the Drop operation finishes.
- Returns:
- EINA_TRUE on success, EINA_FALSE otherwise.
This function register a Drop operation on window
. Once the Drop operation finishes, callback
is called. If window
is NULL
, the function returns EINA_FALSE. On success, it returns EINA_TRUE, otherwise it returns EINA_FALSE.
EAPI int ecore_win32_dnd_shutdown | ( | ) |
Shut down the Ecore_Win32 Drag and Drop module.
- Returns:
- 0 when the module is completely shut down, 1 or greater otherwise.
This function shuts down the Drag and Drop module. It returns 0 when it has been called the same number of times than ecore_win32_dnd_init(). In that case it shut down the module.
EAPI void ecore_win32_dnd_unregister_drop_target | ( | Ecore_Win32_Window * | window | ) |
Unregister a Drop operation.
- Parameters:
-
window The destination of the Drop operation.
This function unregister a Drop operation on window
. If window
is NULL
, the function does nothing.
EAPI double ecore_win32_double_click_time_get | ( | void | ) |
Retrieve the double and triple click flag timeout.
- Returns:
- The timeout for double clicks in seconds.
This function returns the double clicks in seconds. If ecore_win32_double_click_time_set() has not been called, the default value is returned. See ecore_win32_double_click_time_set() for more informations.
EAPI void ecore_win32_double_click_time_set | ( | double | t | ) |
Sets the timeout for a double and triple clicks to be flagged.
- Parameters:
-
t The time in seconds.
This function sets the time t
between clicks before the double_click flag is set in a button down event. If 3 clicks occur within double this time, the triple_click flag is also set.
EAPI int ecore_win32_init | ( | ) |
Initialize the Ecore_Win32 library.
- Returns:
- 1 or greater on success, 0 on error.
This function sets up the Windows graphic system. It returns 0 on failure, otherwise it returns the number of times it has already been called.
When Ecore_Win32 is not used anymore, call ecore_win32_shutdown() to shut down the Ecore_Win32 library.
EAPI int ecore_win32_screen_depth_get | ( | ) |
Retrieve the depth of the screen.
- Returns:
- The depth of the screen.
This function returns the depth of the screen. If an error occurs, it returns 0.
EAPI int ecore_win32_shutdown | ( | ) |
Shut down the Ecore_Win32 library.
- Returns:
- 0 when the library is completely shut down, 1 or greater otherwise.
This function shuts down the Ecore_Win32 library. It returns 0 when it has been called the same number of times than ecore_win32_init(). In that case it shuts down all the Windows graphic system.
EAPI void ecore_win32_window_borderless_set | ( | Ecore_Win32_Window * | window, | |
Eina_Bool | on | |||
) |
Remove or restore the border of the given window.
- Parameters:
-
window The window. on EINA_TRUE to remove the border, EINA_FALSE to restore it.
This function remove or restore the border of window
. If on
is set to EINA_TRUE, the window will have no border, if it is set to EINA_FALSE, it will have a border. If window
is NULL
or if the state does not change (like setting to borderless while the window has no border), this function does nothing.
EAPI void ecore_win32_window_cursor_set | ( | Ecore_Win32_Window * | window, | |
Ecore_Win32_Cursor * | cursor | |||
) |
Set the given cursor to the given window.
- Parameters:
-
window The window to modify the cursor. cursor The new cursor.
This function sets cursor
to window
. cursor
must have been obtained by ecore_win32_cursor_new() or ecore_win32_cursor_shaped_new(). If window
or cursor
is NULL
, the function does nothing.
EAPI void ecore_win32_window_focus_set | ( | Ecore_Win32_Window * | window | ) |
Set the focus to the given window.
- Parameters:
-
window The window to give focus to.
This function gives the focus to window
. If window
is NULL
, this function does nothing.
EAPI void ecore_win32_window_free | ( | Ecore_Win32_Window * | window | ) |
Free the given window.
- Parameters:
-
window The window to free.
This function frees window
. If window
is NULL
, this function does nothing.
EAPI void ecore_win32_window_fullscreen_set | ( | Ecore_Win32_Window * | window, | |
Eina_Bool | on | |||
) |
Set the given window to fullscreen.
- Parameters:
-
window The window. on EINA_TRUE for fullscreen mode, EINA_FALSE for windowed mode.
This function set window
to fullscreen or windowed mode. If on
is set to EINA_TRUE, the window will be fullscreen, if it is set to EINA_FALSE, it will be windowed. If window
is NULL
or if the state does not change (like setting to fullscreen while the window is already fullscreen), this function does nothing.
Referenced by ecore_win32_window_state_request_send().
EAPI void ecore_win32_window_geometry_get | ( | Ecore_Win32_Window * | window, | |
int * | x, | |||
int * | y, | |||
int * | width, | |||
int * | height | |||
) |
Get the geometry of the given window.
- Parameters:
-
window The window to retrieve the geometry from. x The x coordinate of the position. y The x coordinate of the position. width The width. height The height.
This function retrieves the position and size of window
. x
, y
, width
and height
can be buffers that will be filled with the corresponding values. If one of them is NULL
, nothing will be done for that parameter. If window
is NULL
, and if the buffers are not NULL
, they will be filled with respectively 0, 0, the size of the screen and the height of the screen.
EAPI void ecore_win32_window_hide | ( | Ecore_Win32_Window * | window | ) |
Hide the given window.
- Parameters:
-
window The window to show.
This function hides window
. If window
is NULL
, or on error, this function does nothing.
EAPI void * ecore_win32_window_hwnd_get | ( | Ecore_Win32_Window * | window | ) |
Return the window HANDLE associated to the given window.
- Parameters:
-
window The window to retrieve the HANDLE from.
This function returns the window HANDLE associated to window
. If window
is NULL
, this function returns NULL
.
EAPI void ecore_win32_window_iconified_set | ( | Ecore_Win32_Window * | window, | |
Eina_Bool | on | |||
) |
Iconify or restore the given window.
- Parameters:
-
window The window. on EINA_TRUE to iconify the window, EINA_FALSE to restore it.
This function iconify or restore window
. If on
is set to EINA_TRUE, the window will be iconified, if it is set to EINA_FALSE, it will be restored. If window
is NULL
or if the state does not change (like iconifying the window while it is already iconified), this function does nothing.
Referenced by ecore_win32_window_state_request_send().
EAPI void ecore_win32_window_lower | ( | Ecore_Win32_Window * | window | ) |
Place the given window at the bottom of the Z order.
- Parameters:
-
window The window to place at the bottom.
This function places window
at the bottom of the Z order. If window
is NULL
, this function does nothing.
EAPI void ecore_win32_window_move | ( | Ecore_Win32_Window * | window, | |
int | x, | |||
int | y | |||
) |
Move the given window to a given position.
- Parameters:
-
window The window to move. x The x coordinate of the destination position. y The y coordinate of the destination position.
This function move window
to the new position of coordinates x
and y
. If window
is NULL
, or if it is fullscreen, or on error, this function does nothing.
EAPI void ecore_win32_window_move_resize | ( | Ecore_Win32_Window * | window, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
Move and resize the given window to a given position and size.
- Parameters:
-
window The window to move and resize. x The x coordinate of the destination position. y The x coordinate of the destination position. width The new width. height The new height.
This function resize window
to the new position of coordinates x
and y
and the new width
and height
. If window
is NULL
, or if it is fullscreen, or on error, this function does nothing.
EAPI Ecore_Win32_Window * ecore_win32_window_new | ( | Ecore_Win32_Window * | parent, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
Creates a new window.
- Parameters:
-
parent The parent window. x The x coordinate of the top-left corner of the window. y The y coordinate of the top-left corner of the window. width The width of the window. height The height of hte window.
- Returns:
- A newly allocated window.
This function creates a new window which parent is parent
. width
and height
are the size of the window content (the client part), without the border and title bar. x
and y
are the system coordinates of the top left cerner of the window (that is, of the title bar). This function returns a newly created window on success, and NULL
on failure.
EAPI Ecore_Win32_Window * ecore_win32_window_override_new | ( | Ecore_Win32_Window * | parent, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
Creates a new borderless window.
- Parameters:
-
parent The parent window. x The x coordinate of the top-left corner of the window. y The y coordinate of the top-left corner of the window. width The width of the window. height The height of hte window.
- Returns:
- A newly allocated window.
This function is the same than ecore_win32_window_override_new() but the returned window is borderless.
EAPI void ecore_win32_window_raise | ( | Ecore_Win32_Window * | window | ) |
Place the given window at the top of the Z order.
- Parameters:
-
window The window to place at the top.
This function places window
at the top of the Z order. If window
is NULL
, this function does nothing.
EAPI void ecore_win32_window_resize | ( | Ecore_Win32_Window * | window, | |
int | width, | |||
int | height | |||
) |
Resize the given window to a given size.
- Parameters:
-
window The window to resize. width The new width. height The new height.
This function resize window
to the new width
and height
. If window
is NULL
, or if it is fullscreen, or on error, this function does nothing.
EAPI void ecore_win32_window_show | ( | Ecore_Win32_Window * | window | ) |
Show the given window.
- Parameters:
-
window The window to show.
This function shows window
. If window
is NULL
, or on error, this function does nothing.
EAPI void ecore_win32_window_size_base_get | ( | Ecore_Win32_Window * | window, | |
unsigned int * | base_width, | |||
unsigned int * | base_height | |||
) |
Get the base size of the given window.
- Parameters:
-
window The window. base_width The base width. base_height The bas height.
This function fills the base size of window
in the buffers base_width
and *p base_height. They both can be NULL
. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_base_set | ( | Ecore_Win32_Window * | window, | |
unsigned int | base_width, | |||
unsigned int | base_height | |||
) |
Set the base size of the given window.
- Parameters:
-
window The window. base_width The base width. base_height The base height.
This function sets the base size of window
to base_width
and *p base_height. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_get | ( | Ecore_Win32_Window * | window, | |
int * | width, | |||
int * | height | |||
) |
Get the size of the given window.
- Parameters:
-
window The window to retrieve the size from. width The width. height The height.
This function retrieves the size of window
. width
and height
can be buffers that will be filled with the corresponding values. If one of them is NULL
, nothing will be done for that parameter. If window
is NULL
, and if the buffers are not NULL
, they will be filled with respectively the size of the screen and the height of the screen.
EAPI void ecore_win32_window_size_max_get | ( | Ecore_Win32_Window * | window, | |
unsigned int * | max_width, | |||
unsigned int * | max_height | |||
) |
Get the maximum size of the given window.
- Parameters:
-
window The window. max_width The maximal width. max_height The maximal height.
This function fills the maximum size of window
in the buffers max_width
and *p max_height. They both can be NULL
. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_max_set | ( | Ecore_Win32_Window * | window, | |
unsigned int | max_width, | |||
unsigned int | max_height | |||
) |
Set the maximum size of the given window.
- Parameters:
-
window The window. max_width The maximal width. max_height The maximal height.
This function sets the maximum size of window
to max_width
and *p max_height. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_min_get | ( | Ecore_Win32_Window * | window, | |
unsigned int * | min_width, | |||
unsigned int * | min_height | |||
) |
Get the minimum size of the given window.
- Parameters:
-
window The window. min_width The minimal width. min_height The minimal height.
This function fills the minimum size of window
in the buffers min_width
and *p min_height. They both can be NULL
. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_min_set | ( | Ecore_Win32_Window * | window, | |
unsigned int | min_width, | |||
unsigned int | min_height | |||
) |
Set the minimum size of the given window.
- Parameters:
-
window The window. min_width The minimal width. min_height The minimal height.
This function sets the minimum size of window
to min_width
and *p min_height. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_step_get | ( | Ecore_Win32_Window * | window, | |
unsigned int * | step_width, | |||
unsigned int * | step_height | |||
) |
Get the step size of the given window.
- Parameters:
-
window The window. step_width The step width. step_height The bas height.
This function fills the step size of window
in the buffers step_width
and *p step_height. They both can be NULL
. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_size_step_set | ( | Ecore_Win32_Window * | window, | |
unsigned int | step_width, | |||
unsigned int | step_height | |||
) |
Set the step size of the given window.
- Parameters:
-
window The window. step_width The step width. step_height The step height.
This function sets the step size of window
to step_width
and *p step_height. If window
is NULL
, this functions does nothing.
EAPI void ecore_win32_window_state_request_send | ( | Ecore_Win32_Window * | window, | |
Ecore_Win32_Window_State | state, | |||
unsigned int | set | |||
) |
Apply the modification of the state to the given window.
- Parameters:
-
window The window. state The state to apply changes. set The value of the state change.
This function applies the modification of the state state
of window
. set
is used only for ECORE_WIN32_WINDOW_STATE_ICONIFIED and ECORE_WIN32_WINDOW_STATE_FULLSCREEN. If window
is NULL
, the function does nothing.
References ecore_win32_window_fullscreen_set(), ecore_win32_window_iconified_set(), ECORE_WIN32_WINDOW_STATE_ABOVE, ECORE_WIN32_WINDOW_STATE_BELOW, ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION, ECORE_WIN32_WINDOW_STATE_FULLSCREEN, ECORE_WIN32_WINDOW_STATE_HIDDEN, ECORE_WIN32_WINDOW_STATE_ICONIFIED, ECORE_WIN32_WINDOW_STATE_MAXIMIZED, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT, ECORE_WIN32_WINDOW_STATE_MODAL, ECORE_WIN32_WINDOW_STATE_SHADED, ECORE_WIN32_WINDOW_STATE_STICKY, and ECORE_WIN32_WINDOW_STATE_UNKNOWN.
EAPI void ecore_win32_window_state_set | ( | Ecore_Win32_Window * | window, | |
Ecore_Win32_Window_State * | state, | |||
unsigned int | num | |||
) |
Set the state of the given window.
- Parameters:
-
window The window to modify the state. state An array of the new states. num The number of states in the array.
This function set the state of window
. state
is an array of states of size num
. If window
or state
are NULL
, or if num
is less or equal than 0, the function does nothing.
References ECORE_WIN32_WINDOW_STATE_ABOVE, ECORE_WIN32_WINDOW_STATE_BELOW, ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION, ECORE_WIN32_WINDOW_STATE_FULLSCREEN, ECORE_WIN32_WINDOW_STATE_HIDDEN, ECORE_WIN32_WINDOW_STATE_ICONIFIED, ECORE_WIN32_WINDOW_STATE_MAXIMIZED, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ, ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT, ECORE_WIN32_WINDOW_STATE_MODAL, ECORE_WIN32_WINDOW_STATE_SHADED, ECORE_WIN32_WINDOW_STATE_STICKY, and ECORE_WIN32_WINDOW_STATE_UNKNOWN.
EAPI void ecore_win32_window_title_set | ( | Ecore_Win32_Window * | window, | |
const char * | title | |||
) |
Set the title of the given window.
- Parameters:
-
window The window to set the title. title The new title.
This function sets the title of window
to title
. If window
is NULL
, or if title
is NULL
or empty, or on error, this function does nothing.
EAPI void ecore_win32_window_type_set | ( | Ecore_Win32_Window * | window, | |
Ecore_Win32_Window_Type | type | |||
) |
Set the type of the given window.
- Parameters:
-
window The window to modify the type. type The new types.
This function set the type of window
to type
. If window
is NULL
, the function does nothing.
References ECORE_WIN32_WINDOW_TYPE_DESKTOP, ECORE_WIN32_WINDOW_TYPE_DIALOG, ECORE_WIN32_WINDOW_TYPE_DOCK, ECORE_WIN32_WINDOW_TYPE_MENU, ECORE_WIN32_WINDOW_TYPE_NORMAL, ECORE_WIN32_WINDOW_TYPE_SPLASH, ECORE_WIN32_WINDOW_TYPE_TOOLBAR, ECORE_WIN32_WINDOW_TYPE_UNKNOWN, and ECORE_WIN32_WINDOW_TYPE_UTILITY.