コード例 #1
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
コード例 #2
0
        public static int is_read_only(cef_command_line_t *self)
        {
            is_read_only_delegate d;
            var p = self->_is_read_only;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (is_read_only_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_read_only_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
コード例 #3
0
        public static int is_valid(cef_command_line_t *self)
        {
            is_valid_delegate d;
            var p = self->_is_valid;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
コード例 #4
0
        public static int has_at_least_one_ref(cef_command_line_t *self)
        {
            has_at_least_one_ref_delegate d;
            var p = self->_base._has_at_least_one_ref;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            return(d(self));
        }
コード例 #5
0
        public static int release(cef_command_line_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
コード例 #6
0
        public static void add_ref(cef_command_line_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
コード例 #7
0
        public static void prepend_wrapper(cef_command_line_t *self, cef_string_t *wrapper)
        {
            prepend_wrapper_delegate d;
            var p = self->_prepend_wrapper;

            if (p == _p16)
            {
                d = _d16;
            }
            else
            {
                d = (prepend_wrapper_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(prepend_wrapper_delegate));
                if (_p16 == IntPtr.Zero)
                {
                    _d16 = d; _p16 = p;
                }
            }
            d(self, wrapper);
        }
コード例 #8
0
        public static void append_argument(cef_command_line_t *self, cef_string_t *argument)
        {
            append_argument_delegate d;
            var p = self->_append_argument;

            if (p == _p15)
            {
                d = _d15;
            }
            else
            {
                d = (append_argument_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(append_argument_delegate));
                if (_p15 == IntPtr.Zero)
                {
                    _d15 = d; _p15 = p;
                }
            }
            d(self, argument);
        }
コード例 #9
0
        public static void get_arguments(cef_command_line_t *self, cef_string_list *arguments)
        {
            get_arguments_delegate d;
            var p = self->_get_arguments;

            if (p == _p14)
            {
                d = _d14;
            }
            else
            {
                d = (get_arguments_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_arguments_delegate));
                if (_p14 == IntPtr.Zero)
                {
                    _d14 = d; _p14 = p;
                }
            }
            d(self, arguments);
        }
コード例 #10
0
        public static int has_arguments(cef_command_line_t *self)
        {
            has_arguments_delegate d;
            var p = self->_has_arguments;

            if (p == _p13)
            {
                d = _d13;
            }
            else
            {
                d = (has_arguments_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_arguments_delegate));
                if (_p13 == IntPtr.Zero)
                {
                    _d13 = d; _p13 = p;
                }
            }
            return(d(self));
        }
コード例 #11
0
        public static void append_switch_with_value(cef_command_line_t *self, cef_string_t *name, cef_string_t *value)
        {
            append_switch_with_value_delegate d;
            var p = self->_append_switch_with_value;

            if (p == _p12)
            {
                d = _d12;
            }
            else
            {
                d = (append_switch_with_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(append_switch_with_value_delegate));
                if (_p12 == IntPtr.Zero)
                {
                    _d12 = d; _p12 = p;
                }
            }
            d(self, name, value);
        }
コード例 #12
0
        public static void append_switch(cef_command_line_t *self, cef_string_t *name)
        {
            append_switch_delegate d;
            var p = self->_append_switch;

            if (p == _p11)
            {
                d = _d11;
            }
            else
            {
                d = (append_switch_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(append_switch_delegate));
                if (_p11 == IntPtr.Zero)
                {
                    _d11 = d; _p11 = p;
                }
            }
            d(self, name);
        }
コード例 #13
0
        public static void get_switches(cef_command_line_t *self, cef_string_map *switches)
        {
            get_switches_delegate d;
            var p = self->_get_switches;

            if (p == _p10)
            {
                d = _d10;
            }
            else
            {
                d = (get_switches_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_switches_delegate));
                if (_p10 == IntPtr.Zero)
                {
                    _d10 = d; _p10 = p;
                }
            }
            d(self, switches);
        }
コード例 #14
0
        public static cef_command_line_t *copy(cef_command_line_t *self)
        {
            copy_delegate d;
            var           p = self->_copy;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (copy_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(copy_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self));
        }
コード例 #15
0
        public static void init_from_argv(cef_command_line_t *self, int argc, byte **argv)
        {
            init_from_argv_delegate d;
            var p = self->_init_from_argv;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (init_from_argv_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(init_from_argv_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            d(self, argc, argv);
        }
コード例 #16
0
        public static int get_refct(cef_command_line_t *self)
        {
            get_refct_delegate d;
            var p = self->_base._get_refct;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
コード例 #17
0
        public static int has_switch(cef_command_line_t *self, cef_string_t *name)
        {
            has_switch_delegate d;
            var p = self->_has_switch;

            if (p == _pf)
            {
                d = _df;
            }
            else
            {
                d = (has_switch_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_switch_delegate));
                if (_pf == IntPtr.Zero)
                {
                    _df = d; _pf = p;
                }
            }
            return(d(self, name));
        }
コード例 #18
0
        public static cef_string_userfree *get_switch_value(cef_command_line_t *self, cef_string_t *name)
        {
            get_switch_value_delegate d;
            var p = self->_get_switch_value;

            if (p == _p10)
            {
                d = _d10;
            }
            else
            {
                d = (get_switch_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_switch_value_delegate));
                if (_p10 == IntPtr.Zero)
                {
                    _d10 = d; _p10 = p;
                }
            }
            return(d(self, name));
        }
コード例 #19
0
        public static void set_program(cef_command_line_t *self, cef_string_t *program)
        {
            set_program_delegate d;
            var p = self->_set_program;

            if (p == _pd)
            {
                d = _dd;
            }
            else
            {
                d = (set_program_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_program_delegate));
                if (_pd == IntPtr.Zero)
                {
                    _dd = d; _pd = p;
                }
            }
            d(self, program);
        }
コード例 #20
0
        public static int has_switches(cef_command_line_t *self)
        {
            has_switches_delegate d;
            var p = self->_has_switches;

            if (p == _pe)
            {
                d = _de;
            }
            else
            {
                d = (has_switches_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_switches_delegate));
                if (_pe == IntPtr.Zero)
                {
                    _de = d; _pe = p;
                }
            }
            return(d(self));
        }
コード例 #21
0
        public static cef_string_userfree *get_program(cef_command_line_t *self)
        {
            get_program_delegate d;
            var p = self->_get_program;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (get_program_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_program_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self));
        }
コード例 #22
0
        public static void get_argv(cef_command_line_t *self, cef_string_list *argv)
        {
            get_argv_delegate d;
            var p = self->_get_argv;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (get_argv_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_argv_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            d(self, argv);
        }
コード例 #23
0
        public static void reset(cef_command_line_t *self)
        {
            reset_delegate d;
            var            p = self->_reset;

            if (p == _p9)
            {
                d = _d9;
            }
            else
            {
                d = (reset_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reset_delegate));
                if (_p9 == IntPtr.Zero)
                {
                    _d9 = d; _p9 = p;
                }
            }
            d(self);
        }
コード例 #24
0
        public static void init_from_string(cef_command_line_t *self, cef_string_t *command_line)
        {
            init_from_string_delegate d;
            var p = self->_init_from_string;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (init_from_string_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(init_from_string_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            d(self, command_line);
        }
コード例 #25
0
 internal static CefCommandLine FromNative(cef_command_line_t *ptr)
 {
     return(new CefCommandLine(ptr));
 }
コード例 #26
0
        // void (*)(_cef_browser_process_handler_t* self, _cef_command_line_t* command_line)*
        private static unsafe void OnBeforeChildProcessLaunchImpl(cef_browser_process_handler_t *self, cef_command_line_t *command_line)
        {
            var instance = GetInstance((IntPtr)self) as CefBrowserProcessHandler;

            if (instance == null || ((ICefBrowserProcessHandlerPrivate)instance).AvoidOnBeforeChildProcessLaunch())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)command_line);
                return;
            }
            instance.OnBeforeChildProcessLaunch(CefCommandLine.Wrap(CefCommandLine.Create, command_line));
        }
コード例 #27
0
ファイル: libcef.g.cs プロジェクト: PlumpMath/cefglue-2
 public static extern int launch_process(cef_command_line_t *command_line);
コード例 #28
0
        private void on_before_command_line_processing(cef_app_t *self, cef_string_t *process_type, cef_command_line_t *command_line)
        {
            CheckSelf(self);

            var processType   = cef_string_t.ToString(process_type);
            var m_commandLine = CefCommandLine.FromNative(command_line);

            OnBeforeCommandLineProcessing(processType, m_commandLine);

            m_commandLine.Dispose();
        }
コード例 #29
0
 public unsafe void OnBeforeCommandLineProcessing([Immutable] cef_string_t *process_type, cef_command_line_t *command_line)
 {
     fixed(cef_app_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_app_t *, cef_string_t *, cef_command_line_t *, void >)on_before_command_line_processing)(self, process_type, command_line);
     }
 }
コード例 #30
0
        private void on_before_child_process_launch(cef_browser_process_handler_t *self, cef_command_line_t *command_line)
        {
            CheckSelf(self);

            var m_commandLine = CefCommandLine.FromNative(command_line);

            OnBeforeChildProcessLaunch(m_commandLine);
            m_commandLine.Dispose();
        }
コード例 #31
0
        // void (*)(_cef_app_t* self, const cef_string_t* process_type, _cef_command_line_t* command_line)*
        private static unsafe void OnBeforeCommandLineProcessingImpl(cef_app_t *self, cef_string_t *process_type, cef_command_line_t *command_line)
        {
            var instance = GetInstance((IntPtr)self) as CefApp;

            if (instance == null || ((ICefAppPrivate)instance).AvoidOnBeforeCommandLineProcessing())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)command_line);
                return;
            }
            instance.OnBeforeCommandLineProcessing(CefString.Read(process_type), CefCommandLine.Wrap(CefCommandLine.Create, command_line));
        }
コード例 #32
0
 private CefCommandLine(cef_command_line_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }