summaryrefslogtreecommitdiff
path: root/src/bin/e_border.h
blob: fd4dac4fe89ed9edd66e2a4fce686d79257d272a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
#ifdef E_TYPEDEFS

typedef enum _E_Screen_Limits
{
    E_SCREEN_LIMITS_PARTLY = 0,
    E_SCREEN_LIMITS_COMPLETELY = 1,
    E_SCREEN_LIMITS_WITHIN = 2
} E_Screen_Limits;

typedef enum _E_Icon_Preference
{
   E_ICON_PREF_E_DEFAULT,
   E_ICON_PREF_NETWM,
   E_ICON_PREF_USER
} E_Icon_Preference;

typedef enum _E_Direction
{
   E_DIRECTION_UP,
   E_DIRECTION_DOWN,
   E_DIRECTION_LEFT,
   E_DIRECTION_RIGHT
} E_Direction;

typedef enum _E_Transition
{
   E_TRANSITION_LINEAR = 0,
   E_TRANSITION_SINUSOIDAL = 1,
   E_TRANSITION_ACCELERATE = 2,
   E_TRANSITION_DECELERATE = 3,
   E_TRANSITION_ACCELERATE_LOTS = 4,
   E_TRANSITION_DECELERATE_LOTS = 5,
   E_TRANSITION_SINUSOIDAL_LOTS = 6,
   E_TRANSITION_BOUNCE = 7,
   E_TRANSITION_BOUNCE_LOTS = 8
} E_Transition;

typedef enum _E_Stacking
{
   E_STACKING_NONE,
   E_STACKING_ABOVE,
   E_STACKING_BELOW
} E_Stacking;

typedef enum _E_Focus_Policy
{
   E_FOCUS_CLICK,
   E_FOCUS_MOUSE,
   E_FOCUS_SLOPPY
} E_Focus_Policy;

typedef enum _E_Urgency_Policy
{
   E_ACTIVEHINT_POLICY_IGNORE,
   E_ACTIVEHINT_POLICY_ANIMATE,
   E_ACTIVEHINT_POLICY_ACTIVATE
} E_Urgency_Policy;

typedef enum _E_Focus_Setting
{
   E_FOCUS_NONE,
   E_FOCUS_NEW_WINDOW,
   E_FOCUS_NEW_DIALOG,
   E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED
} E_Focus_Setting;

typedef enum _E_Maximize
{
   E_MAXIMIZE_NONE = 0x00000000,
   E_MAXIMIZE_FULLSCREEN = 0x00000001,
   E_MAXIMIZE_SMART = 0x00000002,
   E_MAXIMIZE_EXPAND = 0x00000003,
   E_MAXIMIZE_FILL = 0x00000004,
   E_MAXIMIZE_TYPE = 0x0000000f,
   E_MAXIMIZE_VERTICAL = 0x00000010,
   E_MAXIMIZE_HORIZONTAL = 0x00000020,
   E_MAXIMIZE_BOTH = 0x00000030,
   E_MAXIMIZE_LEFT = 0x00000070,
   E_MAXIMIZE_RIGHT = 0x000000b0,
   E_MAXIMIZE_DIRECTION = 0x000000f0
} E_Maximize;

typedef enum _E_Fullscreen
{
   /* Resize window */
   E_FULLSCREEN_RESIZE,
   /* Change screen resoultion and resize window */
   E_FULLSCREEN_ZOOM
} E_Fullscreen;

typedef enum _E_Window_Placement
{
   E_WINDOW_PLACEMENT_SMART,
   E_WINDOW_PLACEMENT_ANTIGADGET,
   E_WINDOW_PLACEMENT_CURSOR,
   E_WINDOW_PLACEMENT_MANUAL
} E_Window_Placement;

typedef enum _E_Border_Hook_Point
{
   E_BORDER_HOOK_EVAL_PRE_FETCH,
   E_BORDER_HOOK_EVAL_PRE_POST_FETCH,
   E_BORDER_HOOK_EVAL_POST_FETCH,
   E_BORDER_HOOK_EVAL_PRE_BORDER_ASSIGN,
   E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN,
   E_BORDER_HOOK_EVAL_PRE_NEW_BORDER,
   E_BORDER_HOOK_EVAL_POST_NEW_BORDER,
   E_BORDER_HOOK_EVAL_END,
   E_BORDER_HOOK_CONTAINER_LAYOUT,
   E_BORDER_HOOK_NEW_BORDER,
   E_BORDER_HOOK_SET_DESK,
   E_BORDER_HOOK_MOVE_BEGIN,
   E_BORDER_HOOK_MOVE_UPDATE,
   E_BORDER_HOOK_MOVE_END,
   E_BORDER_HOOK_RESIZE_BEGIN,
   E_BORDER_HOOK_RESIZE_UPDATE,
   E_BORDER_HOOK_RESIZE_END
} E_Border_Hook_Point;

typedef struct _E_Border                     E_Border;
typedef struct _E_Border_Pending_Move_Resize E_Border_Pending_Move_Resize;
typedef struct _E_Border_Hook                E_Border_Hook;
typedef struct _E_Event_Border_Simple        E_Event_Border_Resize;
typedef struct _E_Event_Border_Simple        E_Event_Border_Move;
typedef struct _E_Event_Border_Simple        E_Event_Border_Add;
typedef struct _E_Event_Border_Simple        E_Event_Border_Remove;
typedef struct _E_Event_Border_Simple        E_Event_Border_Show;
typedef struct _E_Event_Border_Hide             E_Event_Border_Hide;
typedef struct _E_Event_Border_Simple        E_Event_Border_Iconify;
typedef struct _E_Event_Border_Simple        E_Event_Border_Uniconify;
typedef struct _E_Event_Border_Simple        E_Event_Border_Stick;
typedef struct _E_Event_Border_Simple        E_Event_Border_Unstick;
typedef struct _E_Event_Border_Zone_Set      E_Event_Border_Zone_Set;
typedef struct _E_Event_Border_Desk_Set      E_Event_Border_Desk_Set;
typedef struct _E_Event_Border_Stack         E_Event_Border_Stack;
typedef struct _E_Event_Border_Simple        E_Event_Border_Icon_Change;
typedef struct _E_Event_Border_Simple        E_Event_Border_Urgent_Change;
typedef struct _E_Event_Border_Simple        E_Event_Border_Focus_In;
typedef struct _E_Event_Border_Simple        E_Event_Border_Focus_Out;
typedef struct _E_Event_Border_Simple        E_Event_Border_Property;
typedef struct _E_Event_Border_Simple        E_Event_Border_Fullscreen;
typedef struct _E_Event_Border_Simple        E_Event_Border_Unfullscreen;
typedef void                               (*E_Border_Move_Intercept_Cb)(E_Border *, int x, int y);
#else
#ifndef E_BORDER_H
#define E_BORDER_H

#define E_BORDER_TYPE (int)0xE0b01002

struct _E_Border
{
   E_Object e_obj_inherit;

   struct
   {
      struct
      {
         int x, y, w, h;
         int mx, my;
      } current, last_down[3], last_up[3];
   } mouse;

   struct
   {
      struct
      {
         int x, y, w, h;
         int mx, my;
         int button;
      } down;
   } moveinfo;

   int            x, y, w, h;
   int            ref;
   E_Zone        *zone;
   E_Desk        *desk;

   struct
   {
      int x, y;
      struct
      {
         int    x, y;
         double t;
      } start;
   } fx;

   struct
   {
      int l, r, t, b;
      Eina_Bool calc : 1; // inset has been calculated
   } client_inset;

   E_Comp_Win   *cw;
   Ecore_X_Window win;
   Evas_Object   *bg_object;
   Evas_Object   *icon_object;
   Eina_Stringshare  *internal_icon;
   Eina_Stringshare  *internal_icon_key;

   struct
   {
      Ecore_X_Window lock_win;
      Ecore_X_Window win;

      int            w, h;

      struct
      {
         unsigned char changed : 1;
         unsigned char user_selected : 1;
         Eina_Stringshare *name;
      } border;

      unsigned char  shaped : 1;
      unsigned char  argb : 1;

      /* ICCCM */
      struct
      {
         Eina_Stringshare        *title;
         Eina_Stringshare        *name;
         Eina_Stringshare        *class;
         Eina_Stringshare        *icon_name;
         Eina_Stringshare        *machine;
         int                       min_w, min_h;
         int                       max_w, max_h;
         int                       base_w, base_h;
         int                       step_w, step_h;
         int                       start_x, start_y;
         double                    min_aspect, max_aspect;
         Ecore_X_Window_State_Hint initial_state;
         Ecore_X_Window_State_Hint state;
         Ecore_X_Pixmap            icon_pixmap;
         Ecore_X_Pixmap            icon_mask;
         Ecore_X_Window            icon_window;
         Ecore_X_Window            window_group;
         Ecore_X_Window            transient_for;
         Ecore_X_Window            client_leader;
         Ecore_X_Gravity           gravity;
         Eina_Stringshare         *window_role;
         unsigned char             take_focus : 1;
         unsigned char             accepts_focus : 1;
         unsigned char             urgent : 1;
         unsigned char             delete_request : 1;
         unsigned char             request_pos : 1;
         struct
         {
            int    argc;
            char **argv;
         } command;
         struct
         {
            unsigned char title : 1;
            unsigned char name_class : 1;
            unsigned char icon_name : 1;
            unsigned char machine : 1;
            unsigned char hints : 1;
            unsigned char size_pos_hints : 1;
            unsigned char protocol : 1;
            unsigned char transient_for : 1;
            unsigned char client_leader : 1;
            unsigned char window_role : 1;
            unsigned char state : 1;
            unsigned char command : 1;
         } fetch;
      } icccm;

      /* MWM */
      struct
      {
         Ecore_X_MWM_Hint_Func  func;
         Ecore_X_MWM_Hint_Decor decor;
         Ecore_X_MWM_Hint_Input input;
         unsigned char          exists : 1;
         unsigned char          borderless : 1;
         struct
         {
            unsigned char hints : 1;
         } fetch;
      } mwm;

      /* NetWM */
      struct
      {
         pid_t         pid;
         unsigned int  desktop;
         Eina_Stringshare *name;
         Eina_Stringshare *icon_name;
         Ecore_X_Icon *icons;
         int           num_icons;
         unsigned int  user_time;
         unsigned char opacity;
         Eina_Bool     opacity_changed : 1; // prevent fetching opacity next prop change
         struct
         {
            int left;
            int right;
            int top;
            int bottom;
            int left_start_y;
            int left_end_y;
            int right_start_y;
            int right_end_y;
            int top_start_x;
            int top_end_x;
            int bottom_start_x;
            int bottom_end_x;
         } strut;
         unsigned char ping : 1;
         struct
         {
            unsigned char        request : 1;
            unsigned int         wait;
            Ecore_X_Sync_Alarm   alarm;
            Ecore_X_Sync_Counter counter;
            unsigned int         serial;
            double               send_time;
         } sync;

         /* NetWM Window state */
         struct
         {
            unsigned char modal : 1;
            unsigned char sticky : 1;
            unsigned char maximized_v : 1;
            unsigned char maximized_h : 1;
            unsigned char shaded : 1;
            unsigned char skip_taskbar : 1;
            unsigned char skip_pager : 1;
            unsigned char hidden : 1;
            unsigned char fullscreen : 1;
            E_Stacking    stacking;
         } state;

         /* NetWM Window allowed actions */
         struct
         {
            unsigned char move : 1;
            unsigned char resize : 1;
            unsigned char minimize : 1;
            unsigned char shade : 1;
            unsigned char stick : 1;
            unsigned char maximized_h : 1;
            unsigned char maximized_v : 1;
            unsigned char fullscreen : 1;
            unsigned char change_desktop : 1;
            unsigned char close : 1;
         } action;

         Ecore_X_Window_Type  type;
         Ecore_X_Window_Type *extra_types;
         int                  extra_types_num;
         int                  startup_id;

         struct
         {
            unsigned char name : 1;
            unsigned char icon_name : 1;
            unsigned char icon : 1;
            unsigned char user_time : 1;
            unsigned char strut : 1;
            unsigned char type : 1;
            unsigned char state : 1;
            unsigned char opacity : 1;
            /* No, fetch on new_client, shouldn't be changed after map.
               unsigned char pid : 1;
             */
            /* No, ignore this
               unsigned char desktop : 1;
             */
         } fetch;

         struct
         {
            unsigned char state : 1;
         } update;
      } netwm;

      /* Extra e stuff */
      struct
      {
         struct
         {
            struct
            {
               int           x, y;

               unsigned char updated : 1;
            } video_position;
            Ecore_X_Window video_parent;
            E_Border      *video_parent_border;
            Eina_List     *video_child;
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
            struct
            {
               Eina_Stringshare *name;
               Eina_Stringshare **available_list;
               int             num;
               unsigned char   wait_for_done : 1;
               unsigned char   use : 1;
            } profile;
#endif
            unsigned char  centered : 1;
            unsigned char  video : 1;
         } state;

         struct
         {
            unsigned char state : 1;
            unsigned char video_parent : 1;
            unsigned char video_position : 1;
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
            unsigned char profile : 1;
#endif
         } fetch;
      } e;

      struct
      {
         struct
         {
            unsigned char soft_menu : 1;
            unsigned char soft_menus : 1;
         } fetch;

         unsigned char soft_menu : 1;
         unsigned char soft_menus : 1;
      } qtopia;

      struct
      {
         struct
         {
            unsigned char state : 1;
            unsigned char vkbd : 1;
         } fetch;
         Ecore_X_Virtual_Keyboard_State state;
         unsigned char                  have_property : 1;
         unsigned char                  vkbd : 1;
      } vkbd;

      struct
      {
         struct
         {
            struct
            {
               unsigned char conformant : 1;
            } fetch;
            unsigned char conformant : 1;
         } conformant;
         struct
         {
            struct
            {
               unsigned char state : 1;
               struct
               {
                  unsigned int major : 1;
                  unsigned int minor : 1;
               } priority;
               unsigned char quickpanel : 1;
               unsigned char zone : 1;
            } fetch;
            Ecore_X_Illume_Quickpanel_State state;
            struct
            {
               unsigned int major : 1;
               unsigned int minor : 1;
            } priority;
            unsigned char                   quickpanel : 1;
            int                             zone;
         } quickpanel;
         struct
         {
            struct
            {
               unsigned char drag : 1;
               unsigned char locked : 1;
            } fetch;
            unsigned char drag : 1;
            unsigned char locked : 1;
         } drag;
         struct
         {
            struct
            {
               unsigned char state : 1;
            } fetch;
            Ecore_X_Illume_Window_State state;
         } win_state;
      } illume;

      Ecore_X_Window_Attributes initial_attributes;
   } client;

   E_Container_Shape *shape;

   unsigned int       visible : 1;
   Eina_Bool          hidden : 1; // set when window has been hidden by api and should not be shown
   unsigned int       await_hide_event;
   unsigned int       moving : 1;
   unsigned int       focused : 1;
   unsigned int       new_client : 1;
   unsigned int       re_manage : 1;
   unsigned int       placed : 1;
   unsigned int       shading : 1;
   unsigned int       shaded : 1;
   unsigned int       iconic : 1;
   unsigned int       deskshow : 1;
   unsigned int       sticky : 1;
   unsigned int       shaped_input : 1;
   unsigned int       need_shape_merge : 1;
   unsigned int       need_shape_export : 1;
   unsigned int       fullscreen : 1;
   unsigned int       need_fullscreen : 1;
   unsigned int       already_unparented : 1;
   unsigned int       need_reparent : 1;
   unsigned int       button_grabbed : 1;
   unsigned int       delete_requested : 1;
   unsigned int       ping_ok : 1;
   unsigned int       hung : 1;
   unsigned int       take_focus : 1;
   unsigned int       want_focus : 1;
   unsigned int       user_skip_winlist : 1;
   unsigned int       need_maximize : 1;
   E_Maximize         maximized;
   E_Fullscreen       fullscreen_policy;
   unsigned int       borderless : 1;
   unsigned char      offer_resistance : 1;
   Eina_Stringshare  *bordername;

   unsigned int       lock_user_location : 1; /*DONE*/
   unsigned int       lock_client_location : 1; /*DONE*/
   unsigned int       lock_user_size : 1; /*DONE*/
   unsigned int       lock_client_size : 1; /*DONE*/
   unsigned int       lock_user_stacking : 1; /*DONE*/
   unsigned int       lock_client_stacking : 1; /*DONE*/
   unsigned int       lock_user_iconify : 1; /*DONE*/
   unsigned int       lock_client_iconify : 1; /*DONE*/
   unsigned int       lock_user_desk : 1;
   unsigned int       lock_client_desk : 1;
   unsigned int       lock_user_sticky : 1; /*DONE*/
   unsigned int       lock_client_sticky : 1; /*DONE*/
   unsigned int       lock_user_shade : 1; /*DONE*/
   unsigned int       lock_client_shade : 1; /*DONE*/
   unsigned int       lock_user_maximize : 1; /*DONE*/
   unsigned int       lock_client_maximize : 1; /*DONE*/
   unsigned int       lock_user_fullscreen : 1; /*DONE*/
   unsigned int       lock_client_fullscreen : 1; /*DONE*/
   unsigned int       lock_border : 1; /*DONE*/
   unsigned int       lock_close : 1; /*DONE*/
   unsigned int       lock_focus_in : 1; /*DONE*/
   unsigned int       lock_focus_out : 1; /*DONE*/
   unsigned int       lock_life : 1; /*DONE*/

   unsigned int       internal : 1;
   unsigned int       internal_no_remember : 1;
   unsigned int       internal_no_reopen : 1;
   unsigned int       stolen : 1;
   Eina_Bool          theme_shadow : 1;

   Ecore_Evas        *internal_ecore_evas;

   double             ping;

   unsigned char      changed : 1;

   unsigned char      icon_preference;
   unsigned char      ignore_first_unmap;
   unsigned char      resize_mode;

   struct
   {
      int          x, y, w, h;
      E_Layer      layer;
      int          zone;
      E_Maximize   maximized;
   } saved;

   struct
   {
      unsigned char valid : 1;
      int           x, y, w, h;
      struct
      {
         int x, y, w, h;
      } saved;
   } pre_res_change;

   struct
   {
      double          start;
      double          val;
      int             x, y;
      E_Direction     dir;
      Ecore_Animator *anim;
   } shade;

   struct
   {
      int x, y;
      int modified;
   } shelf_fix;

   Eina_List       *stick_desks;
   E_Menu          *border_menu;
   E_Config_Dialog *border_locks_dialog;
   E_Config_Dialog *border_remember_dialog;
   E_Config_Dialog *border_border_dialog;
   E_Dialog        *border_prop_dialog;
   Eina_List       *pending_move_resize;

   struct
   {
      unsigned char visible : 1;
      unsigned char pos : 1;
      unsigned char size : 1;
      unsigned char stack : 1;
      unsigned char prop : 1;
      unsigned char border : 1;
      unsigned char reset_gravity : 1;
      unsigned char shading : 1;
      unsigned char shaded : 1;
      unsigned char shape : 1;
      unsigned char shape_input : 1;
      unsigned char icon : 1;
   } changes;

   struct
   {
      unsigned char start : 1;
      int           x, y;
   } drag;

   E_Layer                    layer;
   E_Action                  *cur_mouse_action;
   Ecore_Timer               *raise_timer;
   Ecore_Poller              *ping_poller;
   Ecore_Timer               *kill_timer;
   E_Border_Move_Intercept_Cb move_intercept_cb;
   int                        shape_rects_num;
   Ecore_X_Rectangle         *shape_rects;
   E_Remember                *remember;

   E_Border                  *modal;

   E_Border                  *leader;
   Eina_List                 *group;

   E_Border                  *parent;
   Eina_List                 *transients;

   Efreet_Desktop            *desktop;

   unsigned char              comp_hidden   : 1;

   unsigned char              post_move   : 1;
   unsigned char              post_resize : 1;
   unsigned char              post_show : 1;
   unsigned char              during_lost : 1;

   Ecore_Idle_Enterer        *post_job;

   Eina_Bool                  argb;

   int                        tmp_input_hidden;
};

struct _E_Border_Pending_Move_Resize
{
   int           x, y, w, h;
   unsigned char move : 1;
   unsigned char resize : 1;
   unsigned char without_border : 1;
   unsigned int  serial;
};

struct _E_Border_Hook
{
   E_Border_Hook_Point hookpoint;
   void                (*func)(void *data, void *bd);
   void               *data;
   unsigned char       delete_me : 1;
};

struct _E_Event_Border_Hide
{
   E_Border *border;
   int manage;
};

struct _E_Event_Border_Simple
{
   E_Border *border;
};

struct _E_Event_Border_Zone_Set
{
   E_Border *border;
   E_Zone   *zone;
};

struct _E_Event_Border_Desk_Set
{
   E_Border *border;
   E_Desk   *desk;
};

struct _E_Event_Border_Stack
{
   E_Border  *border, *stack;
   E_Stacking type;
};

EINTERN int         e_border_init(void);
EINTERN int         e_border_shutdown(void);

EAPI E_Border      *e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal);
EAPI void           e_border_free(E_Border *bd);
EAPI void           e_border_ref(E_Border *bd);
EAPI void           e_border_unref(E_Border *bd);
EAPI void           e_border_res_change_geometry_save(E_Border *bd);
EAPI void           e_border_res_change_geometry_restore(E_Border *bd);

EAPI void           e_border_zone_set(E_Border *bd, E_Zone *zone);
EAPI void           e_border_desk_set(E_Border *bd, E_Desk *desk);
EAPI void           e_border_show(E_Border *bd);
EAPI void           e_border_hide(E_Border *bd, int manage);
EAPI void           e_border_move(E_Border *bd, int x, int y);
EAPI void           e_border_move_intercept_cb_set(E_Border *bd, E_Border_Move_Intercept_Cb cb);
EAPI void           e_border_move_without_border(E_Border *bd, int x, int y);
EAPI void           e_border_center(E_Border *bd);
EAPI void           e_border_center_pos_get(E_Border *bd, int *x, int *y);
EAPI void           e_border_fx_offset(E_Border *bd, int x, int y);
EAPI void           e_border_resize(E_Border *bd, int w, int h);
EAPI void           e_border_resize_without_border(E_Border *bd, int w, int h);
EAPI void           e_border_move_resize(E_Border *bd, int x, int y, int w, int h);
EAPI void           e_border_move_resize_without_border(E_Border *bd, int x, int y, int w, int h);
EAPI void           e_border_layer_set(E_Border *bd, E_Layer layer);
EAPI void           e_border_raise(E_Border *bd);
EAPI void           e_border_lower(E_Border *bd);
EAPI void           e_border_stack_above(E_Border *bd, E_Border *above);
EAPI void           e_border_stack_below(E_Border *bd, E_Border *below);
EAPI void           e_border_focus_latest_set(E_Border *bd);
EAPI void           e_border_raise_latest_set(E_Border *bd);
EAPI void           e_border_focus_set_with_pointer(E_Border *bd);
EAPI void           e_border_focus_set(E_Border *bd, int focus, int set);
EAPI void           e_border_shade(E_Border *bd, E_Direction dir);
EAPI void           e_border_unshade(E_Border *bd, E_Direction dir);
EAPI void           e_border_maximize(E_Border *bd, E_Maximize max);
EAPI void           e_border_unmaximize(E_Border *bd, E_Maximize max);
EAPI void           e_border_fullscreen(E_Border *bd, E_Fullscreen policy);
EAPI void           e_border_unfullscreen(E_Border *bd);
EAPI void           e_border_iconify(E_Border *bd);
EAPI void           e_border_uniconify(E_Border *bd);
EAPI void           e_border_stick(E_Border *bd);
EAPI void           e_border_unstick(E_Border *bd);
EAPI void           e_border_pinned_set(E_Border *bd, int set);

EAPI E_Border      *e_border_find_by_client_window(Ecore_X_Window win);
EAPI E_Border      *e_border_find_all_by_client_window(Ecore_X_Window win);
EAPI E_Border      *e_border_find_by_window(Ecore_X_Window win);
EAPI E_Border      *e_border_find_by_alarm(Ecore_X_Sync_Alarm alarm);
EAPI E_Border      *e_border_focused_get(void);

EAPI void           e_border_idler_before(void);

EAPI Eina_List     *e_border_client_list(void);

EAPI void           e_border_act_move_keyboard(E_Border *bd);
EAPI void           e_border_act_resize_keyboard(E_Border *bd);

EAPI void           e_border_act_move_begin(E_Border *bd, E_Binding_Event_Mouse_Button *ev);
EAPI void           e_border_act_move_end(E_Border *bd, E_Binding_Event_Mouse_Button *ev);
EAPI void           e_border_act_resize_begin(E_Border *bd, E_Binding_Event_Mouse_Button *ev);
EAPI void           e_border_act_resize_end(E_Border *bd, E_Binding_Event_Mouse_Button *ev);
EAPI void           e_border_act_menu_begin(E_Border *bd, E_Binding_Event_Mouse_Button *ev, int key);
EAPI void           e_border_act_close_begin(E_Border *bd);
EAPI void           e_border_act_kill_begin(E_Border *bd);

EAPI Evas_Object   *e_border_icon_add(E_Border *bd, Evas *evas);

EAPI void           e_border_button_bindings_ungrab_all(void);
EAPI void           e_border_button_bindings_grab_all(void);

EAPI Eina_List     *e_border_focus_stack_get(void);
EAPI Eina_List     *e_border_lost_windows_get(E_Zone *zone);

EAPI void           e_border_ping(E_Border *bd);
EAPI void           e_border_move_cancel(void);
EAPI void           e_border_resize_cancel(void);
EAPI void           e_border_frame_recalc(E_Border *bd);
EAPI Eina_List     *e_border_immortal_windows_get(void);

EAPI const char    *e_border_name_get(const E_Border *bd);

EAPI void           e_border_signal_move_begin(E_Border *bd, const char *sig, const char *src);
EAPI void           e_border_signal_move_end(E_Border *bd, const char *sig, const char *src);
EAPI int            e_border_resizing_get(E_Border *bd);
EAPI void           e_border_signal_resize_begin(E_Border *bd, const char *dir, const char *sig, const char *src);
EAPI void           e_border_signal_resize_end(E_Border *bd, const char *dir, const char *sig, const char *src);
EAPI void           e_border_resize_limit(E_Border *bd, int *w, int *h);

EAPI E_Border_Hook *e_border_hook_add(E_Border_Hook_Point hookpoint, void (*func)(void *data, void *bd), void *data);
EAPI void           e_border_hook_del(E_Border_Hook *bh);
EAPI void           e_border_focus_track_freeze(void);
EAPI void           e_border_focus_track_thaw(void);

EAPI E_Border      *e_border_under_pointer_get(E_Desk *desk, E_Border *exclude);
EAPI int            e_border_pointer_warp_to_center_now(E_Border *bd);
EAPI int            e_border_pointer_warp_to_center(E_Border *bd);

EAPI void           e_border_comp_hidden_set(E_Border *bd, Eina_Bool hidden);
EAPI void           e_border_tmp_input_hidden_push(E_Border *bd);
EAPI void           e_border_tmp_input_hidden_pop(E_Border *bd);

EAPI void           e_border_activate(E_Border *bd, Eina_Bool just_do_it);

EAPI void           e_border_focus_lock_set(Eina_Bool lock);
EAPI Eina_Bool     e_border_focus_lock_get(void);

extern EAPI int E_EVENT_BORDER_RESIZE;
extern EAPI int E_EVENT_BORDER_MOVE;
extern EAPI int E_EVENT_BORDER_ADD;
extern EAPI int E_EVENT_BORDER_SHOW;
extern EAPI int E_EVENT_BORDER_HIDE;
extern EAPI int E_EVENT_BORDER_REMOVE;
extern EAPI int E_EVENT_BORDER_ICONIFY;
extern EAPI int E_EVENT_BORDER_UNICONIFY;
extern EAPI int E_EVENT_BORDER_STICK;
extern EAPI int E_EVENT_BORDER_UNSTICK;
extern EAPI int E_EVENT_BORDER_ZONE_SET;
extern EAPI int E_EVENT_BORDER_DESK_SET;
extern EAPI int E_EVENT_BORDER_STACK;
extern EAPI int E_EVENT_BORDER_ICON_CHANGE;
extern EAPI int E_EVENT_BORDER_URGENT_CHANGE;
extern EAPI int E_EVENT_BORDER_FOCUS_IN;
extern EAPI int E_EVENT_BORDER_FOCUS_OUT;
extern EAPI int E_EVENT_BORDER_PROPERTY;
extern EAPI int E_EVENT_BORDER_FULLSCREEN;
extern EAPI int E_EVENT_BORDER_UNFULLSCREEN;

/* macro for finding misuse of changed flag */
#if 0
# define BD_CHANGED(BD) BD->changed = 1; INF("%s:%d - BD CHANGED: %p", __FILE__, __LINE__, BD)
#else
# define BD_CHANGED(BD) BD->changed = 1
#endif

#endif
#endif